cscie160.hw4
Class ATMImplementation

java.lang.Object
  |
  +--cscie160.hw4.ATMImplementation
All Implemented Interfaces:
ATM

public class ATMImplementation
extends java.lang.Object
implements ATM


Constructor Summary
ATMImplementation()
          | Constructor.
 
Method Summary
 void deposit(float amount)
          | Tells account to deposit [amount].
 float getBalance()
          | Asks account for the balance in that account.
 void withdraw(float amount)
          | Tells account to withdraw [amount]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ATMImplementation

public ATMImplementation()
| Constructor. This ATM has only one account (for now)
Method Detail

deposit

public void deposit(float amount)
             throws ATMException
| Tells account to deposit [amount].
Specified by:
deposit in interface ATM
Parameters:
float - Amount to be deposited.

withdraw

public void withdraw(float amount)
              throws ATMException
| Tells account to withdraw [amount]
Specified by:
withdraw in interface ATM
Parameters:
float - Amount to be withdrawn.

getBalance

public float getBalance()
                 throws ATMException
| Asks account for the balance in that account.
Specified by:
getBalance in interface ATM
Returns:
float Balance in [account]