All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.greenpepper.samples.application.bank.SavingsAccount Maven / Gradle / Ivy

There is a newer version: 4.2.4
Show newest version
package com.greenpepper.samples.application.bank;

/**
 * 

SavingsAccount class.

* * @author oaouattara * @version $Id: $Id */ public class SavingsAccount extends BankAccount { /** *

Constructor for SavingsAccount.

* * @param number a {@link java.lang.String} object. * @param owner a {@link com.greenpepper.samples.application.bank.Owner} object. */ public SavingsAccount(String number, Owner owner) { super(AccountType.SAVINGS, number, owner); } /** {@inheritDoc} */ public void checkFunds(Money amount) throws Exception { if (getBalance().lowerThan(amount)) throw new Exception("Not enougth money !"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy