|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--cscie160.project.account.AccountImpl
By David Cheung
CSCIE160 Project
Due 05-16-2001
AccountImpl class:
Updated for project. This class implements the Account interface:
getBalance, deposit, and withdraw.
This class also kept what was in the last homework (hw5):
getAccountNumber.
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
AccountImpl(int number,
float inputBalance)
Creates an account with an account and initial balance. |
Method Summary | |
void |
deposit(float amount)
deposits money into the account |
int |
getAccountNumber()
returns the account ID for an account |
float |
getBalance()
returns the current balance of the account |
static void |
main(java.lang.String[] argv)
|
void |
withdraw(float amount)
withdraws money from the 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 |
public AccountImpl(int number, float inputBalance) throws java.rmi.RemoteException
Method Detail |
public float getBalance()
getBalance
in interface Account
public void deposit(float amount)
deposit
in interface Account
public void withdraw(float amount)
withdraw
in interface Account
public int getAccountNumber()
public static void main(java.lang.String[] argv)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |