cscie160.hw4
Class Account

java.lang.Object
  |
  +--cscie160.hw4.Account

public class Account
extends java.lang.Object


Constructor Summary
Account()
           
 
Method Summary
 void deposit(float amount)
          | Deposits an $[amount] into this account The amount may not be negative, if so an exception is thrown.
 float getBalance()
          | Accessor.
 void withdraw(float amount)
          | Withdraw $[amount] from this account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Account

public Account()
Method Detail

deposit

public void deposit(float amount)
             throws ATMException
| Deposits an $[amount] into this account The amount may not be negative, if so an exception is thrown.
Parameters:
float - Amount to be deposited into this account.

withdraw

public void withdraw(float amount)
              throws ATMException
| Withdraw $[amount] from this account. The amount may not exceed the balance in the account, if it does, then an exception is thrown.
Parameters:
float - Amount to be withdrawn from this account.

getBalance

public float getBalance()
                 throws ATMException
| Accessor. Returns the balance in the account.
Returns:
float The balance in the account.