Lecture 15
7
class FeeAccount
•Behavior: like RegularAccount, but each transaction costs money, and there’s a monthly fee
•Design
–inherit from BankAccount
–write newMonth method to charge monthly fee
–override countTransaction method!                                                 subtract fee, then do whatever else is customary
•    public void countTransaction()
•    {
•       incrementBalance( -transactionFee );
•       super.countTransaction();
•    }