|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object BankAccount FeeAccount
A FeeAccount is a BankAccount with one new feature: the user is charged for each transaction.
BankAccount
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. |
protected int |
getTransactionFee()
The Bank's transaction fee. |
void |
newMonth()
A FeeAccount incurs a monthly charge. |
Methods inherited from class BankAccount |
deposit, getBalance, getIssuingBank, getTransactionCount, incrementBalance, requestBalance, withdraw |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FeeAccount(int initialBalance, Bank issuingBank) throws InsufficientFundsException
initialBalance
- the opening balance.issuingBank
- the bank that issued this account.
InsufficientFundsException
- when appropriate.Method Detail |
public void countTransaction() throws InsufficientFundsException
countTransaction
in class BankAccount
InsufficientFundsException
- when appropriate.protected int getTransactionFee()
getTransactionFee
in class BankAccount
public void newMonth() throws InsufficientFundsException
newMonth
in class BankAccount
InsufficientFundsException
- when appropriate.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |