|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectedu.trinity.cs.bmassing.bank.Account
public abstract class Account
Class for bank accounts of all types.
| Field Summary | |
|---|---|
protected long |
balance
|
static int |
BANK_ROUTING_NUMBER
|
| Constructor Summary | |
|---|---|
Account(long b,
java.lang.String n,
int a)
Constructor allowing setting initial values of all variables. |
|
| Method Summary | |
|---|---|
abstract void |
addInterest()
Add one month's interest. |
void |
deposit(long amount)
Deposit some money. |
int |
getAccountNumber()
Get account number. |
long |
getBalance()
Get balance. |
java.lang.String |
getName()
Get account name. |
java.lang.String |
toString()
Convert information to String. |
void |
withdraw(long amount)
Withdraw some money. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected long balance
public static final int BANK_ROUTING_NUMBER
| Constructor Detail |
|---|
public Account(long b,
java.lang.String n,
int a)
| Method Detail |
|---|
public void deposit(long amount)
amount - public void withdraw(long amount)
amount -
java.lang.RuntimeException - if amount is more than balancepublic java.lang.String getName()
public long getBalance()
public int getAccountNumber()
public java.lang.String toString()
toString in class java.lang.Objectpublic abstract void addInterest()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||