an abstract bank account.
More...
an abstract bank account.
This abstract class incorporates propertiescommon to both account types: Checking and Savings. However, it's missing the concept withdrawal(), which is different between the two
Account::Account |
( |
unsigned |
accNo | ) |
|
|
inline |
Account constructor.
- Parameters
-
accNo | - the account number to use |
int Account::accountNo |
( |
| ) |
|
|
inline |
accountNo - return the account number
- Returns
- int
double Account::acntBalance |
( |
| ) |
|
|
inline |
acntBalance - return the account balance
- Returns
- double
void Account::deposit |
( |
double |
amount | ) |
|
|
inline |
deposit - deposit an amount to the account
void Account::display |
( |
| ) |
|
|
inline |
display - display the current object on the standard out
static int Account::noAccounts |
( |
| ) |
|
|
inlinestatic |
noAccounts - return the number of accounts
- Returns
- int
virtual const char* Account::type |
( |
| ) |
|
|
inlinevirtual |
type - return an indication of what type of Account the current object is
- Returns
- a string containing the name of the class
Reimplemented in Savings, and Checking.
virtual bool Account::withdrawal |
( |
double |
amount | ) |
|
|
inlinevirtual |
withdrawal - withdraw an amount from the account
The function first checks to make sure that sufficient funds are available. If not, the function outputs an error message and returns a false.
- Returns
- true if the function executed properly
Reimplemented in Savings, and Checking.
unsigned Account::accountNumber |
|
protected |
the number of the current account
the balance in current account
the number of account objects
The documentation for this class was generated from the following file: