Dashboard > GreenPepper Demo > ... > Bank > SavingsAccount.java
  GreenPepper Demo Log In View a printable version of the current page.  
  SavingsAccount.java
Added by admin, last edited by admin on Jan 07, 2009
Labels: 
(None)

SavingsAccount.java
package com.greenpepper.confluence.demo.bank;

public class SavingsAccount
    extends BankAccount
{

  public SavingsAccount(String number, Owner owner)
  {
    super(AccountType.SAVINGS, number, owner);
  }

  public void checkFunds(Money amount)
      throws Exception
  {
    if (getBalance().lowerThan(amount))
    {
      throw new Exception("Not enougth money !");
    }
  }
}

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators