|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Account
Superclass of bank account hierarchy.
Field Summary | |
protected int |
acct_no
The account number. |
protected java.lang.String |
ss
The social security number of owner. |
Constructor Summary | |
Account()
|
|
Account(int id,
double amt,
java.lang.String ss)
Constructor. |
Method Summary | |
double |
balance()
Retrieves the account balance. |
void |
deposit(double amt)
Deposits into account. |
boolean |
withdraw(double amt)
Withdraw from account. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int acct_no
protected java.lang.String ss
Constructor Detail |
public Account()
public Account(int id, double amt, java.lang.String ss)
id
- Account numberamt
- Initial balance amountss
- Social security number as stringMethod Detail |
public double balance()
public void deposit(double amt)
amt
- the amount to deposit, if amt <=0 no effectpublic boolean withdraw(double amt)
amt
- the amount to deposit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |