Class FeeAccount
java.lang.Object
BankAccount
FeeAccount
- public class FeeAccount
- extends BankAccount
A FeeAccount is a BankAccount with one new feature:
the user is charged for each transaction.
- Version:
- 5
Constructor Summary |
FeeAccount(int initialBalance,
Bank issuingBank)
Constructor, accepting an initial balance and issuing Bank. |
Method Summary |
void |
countTransaction()
The way a transaction is counted for a FeeAccount: it levies
a transaction fee as well as counting the transaction. |
void |
newMonth()
Action to take when a new month starts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeeAccount
public FeeAccount(int initialBalance,
Bank issuingBank)
- Constructor, accepting an initial balance and issuing Bank.
- Parameters:
initialBalance
- the opening balance.issuingBank
- the bank that issued this account.
countTransaction
public void countTransaction()
- The way a transaction is counted for a FeeAccount: it levies
a transaction fee as well as counting the transaction.
- Overrides:
countTransaction
in class BankAccount
newMonth
public void newMonth()
- Action to take when a new month starts.
- Specified by:
newMonth
in class BankAccount