cscie160.project
Class AccountImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--cscie160.project.AccountImpl
All Implemented Interfaces:
Account, java.rmi.Remote, java.io.Serializable

public class AccountImpl
extends java.rmi.server.UnicastRemoteObject
implements Account

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
AccountImpl(int mAccountNum, int mAccountPin, float mBalance, boolean mAuthDeposit, boolean mAuthWithdraw, boolean mAuthBalance)
          | Constructor.
 
Method Summary
 void deposit(float mAmount)
          | Deposits an $[amount] into this account The amount may not be negative, if so an exception is thrown.
 int getAccountNum()
           
 int getAccountPin()
           
 boolean getAuthBalance()
           
 boolean getAuthDeposit()
           
 boolean getAuthWithdraw()
           
 float getBalance()
          | Accessors.
 void transfer(float mAmount, cscie160.project.Account mTarget)
          | Transfer $[amount] from this account into mTarget account The amount may not exceed the balance in this account, if it does, then an exception is thrown.
 void withdraw(float mAmount)
          | Withdraw $[amount] from this account.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AccountImpl

public AccountImpl(int mAccountNum,
                   int mAccountPin,
                   float mBalance,
                   boolean mAuthDeposit,
                   boolean mAuthWithdraw,
                   boolean mAuthBalance)
            throws java.rmi.RemoteException
| Constructor.

Method Detail

deposit

public void deposit(float mAmount)
             throws ATMException,
                    java.rmi.RemoteException
| Deposits an $[amount] into this account The amount may not be negative, if so an exception is thrown.

Specified by:
deposit in interface Account
ATMException
java.rmi.RemoteException

withdraw

public void withdraw(float mAmount)
              throws ATMException,
                     java.rmi.RemoteException
| Withdraw $[amount] from this account. The amount may not exceed the balance in the account, if it does, then an exception is thrown.

Specified by:
withdraw in interface Account
ATMException
java.rmi.RemoteException

transfer

public void transfer(float mAmount,
                     cscie160.project.Account mTarget)
              throws ATMException,
                     java.rmi.RemoteException
| Transfer $[amount] from this account into mTarget account The amount may not exceed the balance in this account, if it does, then an exception is thrown.

Specified by:
transfer in interface Account
ATMException
java.rmi.RemoteException

getBalance

public float getBalance()
| Accessors.

Specified by:
getBalance in interface Account

getAccountNum

public int getAccountNum()

getAccountPin

public int getAccountPin()

getAuthBalance

public boolean getAuthBalance()

getAuthDeposit

public boolean getAuthDeposit()

getAuthWithdraw

public boolean getAuthWithdraw()