
684 CHAPTER 10 Object-Oriented Programming,Part 3: Inheritance,Polymorphism,and Interfaces
The SavingsAccount class inherits from the version of the BankAccount class
in which the balance is declared to be private. The SavingsAccount subclass
adds an annual interestRate instance variable, as well as supporting meth-
ods to access, change, and apply the interest rate to the account balance.
Instructions
Copy the source files in the Programming Activity 1 directory for this chap-
ter to a directory on your computer. Load the SavingsAccount.java source
file and search for five asterisks in a row (*****). This will position you to
the six locations in the ...