|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBankAccount
CheckingAccount
public class CheckingAccount
A checking account retains all the features of a bank account. However, a fee of $0.25 is charged for each withdraw (also, balance must always be positive).
Constructor Summary | |
---|---|
CheckingAccount()
Creates a checking account with initial balance equal to zero. |
|
CheckingAccount(double balance)
Creates a checking account with the given initial balance. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Checks whether two checking accounts are equal. |
boolean |
withdraw(double amount)
Each withdraw charges a fee of $0.25. |
Methods inherited from class BankAccount |
---|
deposit, getAccountNumber, getBalance, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CheckingAccount(double balance)
balance
- Initial balancepublic CheckingAccount()
Method Detail |
---|
public boolean withdraw(double amount)
withdraw
in class BankAccount
amount
- Withdrawal amaount
public boolean equals(java.lang.Object o)
equals
in class BankAccount
o
- Object to be compared
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |