Java Program Question Bank
Posted on

Which Keyword Is Used To Prevent Content Of A Variable From Being Modified
Well, this is really vague.Regarding Account:Your Account class looks like a anemic class except the computeInterest method. For this one, you should rename the n parameter to reveal his role.I does not understand your getsetInterest method.One thing that seems wrong is your close method. When an Account is closed it cannot be used anymore. You may maintains another state to know if the account is closed. Or create another ClosedAccount.For TestAccountInterest:You should have a look at a test framework that will run your tests and report failures.Your class is called TestAccount Interest but you are doing more than testing the interest, you are also testing the deposit and withdraw methods.