Class Account
java.lang.Object
clazzfish.sample.jdbc.Account
A simple bank account.
- Since:
- 1.3.1 (16.07.2013)
- Author:
- oboehm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPay off some money.voiddebit(BigDecimal amount) Pay off some money.voidDeposit.voiddeposit(BigDecimal amount) Pay in some money.Gets the balance.Gets the holder.intgetId()Gets the number.voidsetBalance(BigDecimal balance) Sets the balance.toString()To string.voidTransfer an amount from one accout to another account.voidtransfer(BigDecimal amount, Account to) Transfer an amount from one accout to another account.
-
Constructor Details
-
Account
Instantiates a new account.- Parameters:
id- the account numberuser- the user
-
-
Method Details
-
getId
public int getId()Gets the number.- Returns:
- the number
-
getHolder
-
setBalance
-
getBalance
-
deposit
-
deposit
-
debit
-
debit
-
transfer
Transfer an amount from one accout to another account.- Parameters:
amount- the amountto- the account where the amount is transferred to.
-
transfer
-
toString
-