Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class 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:

AbstractBankAccount List of all members.

Public Member Functions

 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.

bool operator== (BankAccountCref) const
 Equality operator.

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

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

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


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   )  throw (InsufficientFundsException) [virtual]
 

Deposit funds into the account.

Parameters:
Amount - to deposit

Implements AbstractBankAccount.

AmountCref BankAccount::getBalance void   )  const [virtual]
 

Retrieve the account balance.

Returns:
Amount const reference to balance

Implements AbstractBankAccount.

BankAccountRef BankAccount::operator= BankAccountCref   ) 
 

Assignment operator.

Parameters:
BankAccount const reference
Returns:
BankAccount reference

bool BankAccount::operator== BankAccountCref   )  const
 

Equality operator.

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

void BankAccount::withdrawFunds Amount   )  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

Implements AbstractBankAccount.


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