org.sourceforge.jemm.sample.demo1.model
Class Account

java.lang.Object
  extended by org.sourceforge.jemm.sample.demo1.model.Account
All Implemented Interfaces:
JEMMObject
Direct Known Subclasses:
SavingsAccount

public class Account
extends java.lang.Object
implements JEMMObject


Field Summary
protected  ShadowUserObject jemmOIF
           
 
Constructor Summary
Account()
          Create a new account with an initial balance of 0.
Account(double initialBalance)
          Create a new account with the given initial balance.
Account(ShadowUserObject jemmOIF)
          Generated by the compiler and used internally for creating an object.
 
Method Summary
 void deposit(double amount)
          Deposit the given about into the account, increasing the balance.
 double getBalance()
          Returns the balance on the account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jemmOIF

protected ShadowUserObject jemmOIF
Constructor Detail

Account

public Account()
Create a new account with an initial balance of 0. Enhanced constructor with begin and end marking points.


Account

public Account(ShadowUserObject jemmOIF)
Generated by the compiler and used internally for creating an object.

Parameters:
jemmOIF - The shadow object this object uses to talk to the store.

Account

public Account(double initialBalance)
Create a new account with the given initial balance.

Parameters:
initialBalance - The initial account balance.
Method Detail

getBalance

public double getBalance()
Returns the balance on the account. This is just a renamed method from getBalance.

Returns:
The balance of the account.

deposit

public void deposit(double amount)
Deposit the given about into the account, increasing the balance.

Parameters:
amount - The amount to deposit.


Copyright © 2009. All Rights Reserved.