Package account
Class AccountImplDefProg
java.lang.Object
account.AccountImplDefProg
- All Implemented Interfaces:
IAccountDefProg
public class AccountImplDefProg extends java.lang.Object implements IAccountDefProg
-
Constructor Summary
Constructors Constructor Description AccountImplDefProg(int amount, java.lang.String owner, int min)
-
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AccountImplDefProg
public AccountImplDefProg(int amount, java.lang.String owner, int min) throws org.valid4j.errors.ContractViolation- Throws:
org.valid4j.errors.ContractViolation
-
-
Method Details
-
balance
public int balance()- Specified by:
balance
in interfaceIAccountDefProg
-
deposit
public void deposit(int amount) throws org.valid4j.errors.ContractViolation- Specified by:
deposit
in interfaceIAccountDefProg
- Throws:
org.valid4j.errors.ContractViolation
-
withdraw2
public void withdraw2(int amount) throws exceptions.OverdraftException, exceptions.HolderException, exceptions.WrongAmountException, exceptions.InsufficientFundsException- Throws:
exceptions.OverdraftException
exceptions.HolderException
exceptions.WrongAmountException
exceptions.InsufficientFundsException
-
withdraw
public void withdraw(int amount) throws exceptions.OverdraftException, exceptions.HolderException, exceptions.WrongAmountException, exceptions.InsufficientFundsException- Specified by:
withdraw
in interfaceIAccountDefProg
- Throws:
exceptions.OverdraftException
exceptions.HolderException
exceptions.WrongAmountException
exceptions.InsufficientFundsException
-
getHolder
public java.lang.String getHolder() throws org.valid4j.errors.ContractViolation- Specified by:
getHolder
in interfaceIAccountDefProg
- Throws:
org.valid4j.errors.ContractViolation
-
setHolder
public void setHolder(java.lang.String newHolder) throws org.valid4j.errors.ContractViolation- Specified by:
setHolder
in interfaceIAccountDefProg
- Throws:
org.valid4j.errors.ContractViolation
-
overdraft
public int overdraft() throws org.valid4j.errors.ContractViolation- Specified by:
overdraft
in interfaceIAccountDefProg
- Throws:
org.valid4j.errors.ContractViolation
-