java.lang.Object | +--SavingsAccount
This class provides some simple services able to be accessed by other classes
Constructor Summary | |
SavingsAccount()
Constructor which sets initial balance to zero. |
|
SavingsAccount(int initialBalance)
Constructor allowing an initial value to be specified. |
Method Summary | |
void |
deposit(int howMuch)
Deposit an amount. |
void |
greet()
Provide a simple text greeting |
void |
showBalance()
|
void |
withdraw(int howMuch)
Withdraw an amount. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SavingsAccount()
Recall that no-argument onstructor is automatically supplied only if no other constructors are supplied.
public SavingsAccount(int initialBalance)
Recall that no-argument onstructor is automatically supplied only if no other constructors are supplied.
initialBalance
- amount in cents for initial account balanceMethod Detail |
public void greet()
public void deposit(int howMuch)
howMuch
- the amount in centspublic void withdraw(int howMuch)
howMuch
- the amount in centspublic void showBalance()