Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

BankAccount Class Reference

BankAccount is a concrete derivation that implements the AbstractBankAccount interface. More...

#include <BankAccount.hpp>

Inheritance diagram for BankAccount

Inheritance graph
[legend]
Collaboration diagram for BankAccount:

Collaboration graph
[legend]
List of all members.

Public Methods

 BankAccount ( void )
 Default constructor.

 BankAccount ( AmountCref ) throw ( InvalidAmountException )
 Starting balance constructor.

 BankAccount ( BankAccountCref )
 Copy constructor.

virtual ~BankAccount ( void )
 Virtual destructor.

BankAccountRef operator= ( BankAccountCref )
 Assignment operator. More...

bool operator== ( BankAccountCref ) const
 Equality operator. More...

virtual AmountCref getBalance (void) const
 Retrieve the account balance. More...

virtual void withdrawFunds (Amount) throw (InsufficientFundsException)
 Withdraw an amount of funds from the account. More...

virtual void depositFunds (Amount) throw (InsufficientFundsException)
 Deposit funds into the account. More...


Detailed Description

BankAccount is a concrete derivation that implements the AbstractBankAccount interface.

It maintains a available funds balance and enforces the semantic that you can no carry a negative balance.


Member Function Documentation

void BankAccount::depositFunds ( Amount anAmount ) throw (InsufficientFundsException) [virtual]
 

Deposit funds into the account.

Parameters:
Amount   - to deposit

Reimplemented from AbstractBankAccount.

AmountCref BankAccount::getBalance ( void ) const [virtual]
 

Retrieve the account balance.

Returns:
Amount const reference to balance

Reimplemented from AbstractBankAccount.

BankAccountRef BankAccount::operator= ( BankAccountCref anAccount )
 

Assignment operator.

Parameters:
BankAccount   const reference
Returns:
BankAccount reference

bool BankAccount::operator== ( BankAccountCref anAccount ) const
 

Equality operator.

Parameters:
BankAccount   const reference
Returns:
true if accounts are the same

void BankAccount::withdrawFunds ( Amount anAmount ) throw (InsufficientFundsException) [virtual]
 

Withdraw an amount of funds from the account.

Parameters:
Amount   - amount to withdraw
Exceptions:
InsufficientFundsException   if the amount requested to withdraw is not available in the account funds

Reimplemented from AbstractBankAccount.


The documentation for this class was generated from the following files:
This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium