|
||||||||
| 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. (If I had more to say about this class, I could say it here.)
| Field Summary | |
|---|---|
protected double |
balance
|
static int |
BANK_ROUTING_NUMBER
|
| Constructor Summary | |
|---|---|
Account(double balance,
java.lang.String name,
int accountNumber)
Constructor allowing setting initial values of all variables. |
|
| Method Summary | |
|---|---|
abstract double |
addInterest()
Compute and add interest. |
double |
deposit(double amount)
Deposit some money. |
int |
getAccountNumber()
Get account number. |
double |
getBalance()
Get balance. |
java.lang.String |
getName()
Get account name. |
java.lang.String |
getPersonName()
Get associated person's name. |
static void |
main(java.lang.String[] args)
Main program to do some simple tests. |
double |
withdraw(double amount)
Withdraw some money. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double balance
public static final int BANK_ROUTING_NUMBER
| Constructor Detail |
|---|
public Account(double balance,
java.lang.String name,
int accountNumber)
| Method Detail |
|---|
public double deposit(double amount)
amount -
public double withdraw(double amount)
amount -
java.lang.RuntimeException - if amount is more than balancepublic java.lang.String getName()
public double getBalance()
public int getAccountNumber()
public abstract double addInterest()
public java.lang.String getPersonName()
HasPersonName
getPersonName in interface HasPersonNamepublic static void main(java.lang.String[] args)
args - command-line arguments (unused)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||