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

java.lang.Object
  extended by org.sourceforge.jemm.sample.demo1.model.orig.Account
Direct Known Subclasses:
SavingsAccount

public class Account
extends java.lang.Object

An Account held by a Person.

Author:
Paul Keeble

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.
 
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
 

Constructor Detail

Account

public Account()
Create a new account with an initial balance of 0.


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.

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.