Overrides deposit and withdraw to increment the transaction count:
public class CheckingAccount extends BankAccount
{
public void deposit(double amount) { . . . }
public void withdraw(double amount) { . . . }
public void deductFees() { . . . } // new method
private int transactionCount; // new instance field
}
Each CheckingAccount object has two instance fields:
balance (inherited from BankAccount)
transactionCount (new to CheckingAccount)
You can apply four methods to CheckingAccount objects: