Answers Lab 4
Answers Lab 4
-----------------------------------------------
EXERCISE 1
2. Write the output from the test harness for class SavingsAccount.
EXERCISE 2
8. Why did the program crash? What kind of exception was thrown?
EXERCISE 3
10. Why does the compiler issue an error message when invoking
newAcc.getTransactionCount()? Why does the compiler issue an error message when
invoking newAcc.getInterestRate()?
11. Can you tell whether in the statement String accountInfo = newAcc.toString();
the
method toString() being invoked is from the class CheckingAccount or from the class
SavingsAccount? Explain your answer.