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 TypeMethodDescriptionvoid
Pay off some money.void
debit
(BigDecimal amount) Pay off some money.void
Deposit.void
deposit
(BigDecimal amount) Pay in some money.Gets the balance.Gets the holder.int
getId()
Gets the number.void
setBalance
(BigDecimal balance) Sets the balance.toString()
To string.void
Transfer an amount from one accout to another account.void
transfer
(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
-