Trees | Indices | Help |
|
---|
|
object --+ | Account
The class Account
represents accounts in a simple
(unrealistic) banking system.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Creates a new account of the given customer. The new account has a given interest rate and a zero balance.
|
Returns the customer who owns the account.
|
Returns the current balance of the account.
|
Deposits the given sum onto the account, assuming the given value is positive. Otherwise, does nothing.
|
Tries to withdraw the given sum from the account, assuming the given amount is positive. If the given amount is higher than the account's current balance, only the money currently available on the account is withdrawn. If the given amount is negative, returns 0.
|
Transfers the given sum from this account to another given account, assuming that there is sufficient money available in this account. If not, no transfer is made at all.
|
Returns the interest rate of the account
|
Sets the interest rate of the account to a new value. If the given value is negative, the interest rate is set to zero instead.
|
Adds interest to the account according to the account's interest rate. E.g. if the interest rate is set to 0.05, adds 5% of the account's balance to the account. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Sep 2 14:44:46 2011 | http://epydoc.sourceforge.net |