|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A simple banking Account interface.
Method Summary | |
void |
credit(float amount)
Adds an amount to the current balance of this account. |
void |
debit(float amount)
Deducts an amount from the current balance of this account. |
int |
getAccountNumber()
Returns the number of this account. |
float |
getBalance()
Returns the current balance of this account. |
void |
setBalance(float amount)
Sets the balance of this account. |
Method Detail |
public int getAccountNumber()
public float getBalance() throws AccountException
AccountException
- If a problem occurs during
this operation, e.g., a problem to access the underlying
database if any.public void setBalance(float amount) throws AccountException
amount
- The balance to be set
AccountException
- If a problem occurs during
this operation, e.g., a problem when updating the underlying
database if any.public void credit(float amount) throws AccountException
amount
- The amount to add.
AccountException
- If a problem occurs during
this operation, e.g., a problem when accessing/updating
the underlying database if any.public void debit(float amount) throws AccountException
amount
- The amount to be deducted.
AccountException
- In case the amount to deduct
is greater than the current balance, or if a problem occurs
when querying/updating the underlying database if any.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |