previous |
start |
next
Inherited Fields are Private
- Consider deposit method of CheckingAccount
public void deposit(double amount)
{
transactionCount++;
// now add amount to balance
...
}
- Can't just add amount to balance
- balance is a private field of the
superclass
- Subclass must use public interface
previous |
start |
next