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
A subclass has no access to private fields of its superclass
Subclass must use public interface
previous
|
start
|
next