cscie160.project.account
Class AccountImpl

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

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

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.

Since:
04-07-2001
See Also:
Serialized Form

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

AccountImpl

public AccountImpl(int number,
                   float inputBalance)
            throws java.rmi.RemoteException
Creates an account with an account and initial balance.
Method Detail

getBalance

public float getBalance()
returns the current balance of the account
Specified by:
getBalance in interface Account

deposit

public void deposit(float amount)
deposits money into the account
Specified by:
deposit in interface Account

withdraw

public void withdraw(float amount)
withdraws money from the account
Specified by:
withdraw in interface Account

getAccountNumber

public int getAccountNumber()
returns the account ID for an account

main

public static void main(java.lang.String[] argv)