|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--BankAccount
This class models a bank account. It has a customer that owns the account and a balance
Constructor Summary | |
BankAccount(Customer theCustomer,
double theBalance)
Constructor that takes a customer and balance |
Method Summary | |
void |
deposit(double amount)
Method to deposit money to an account |
Customer |
getCustomer()
Method to get the customer |
String |
toString()
Method to return information about this bank account in the form of a string |
double |
withdraw(Customer customer,
double amount)
Method to withdraw money from the account for the given customer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BankAccount(Customer theCustomer, double theBalance)
Method Detail |
public Customer getCustomer()
public double withdraw(Customer customer, double amount)
customer
- the customer asking to do the withdrawal
public void deposit(double amount)
amount
- the amount to add to the accountpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |