SavingsAccount Class Reference

A specialization of BankAccount for saving purposes. More...

Inherits BankAccount.

Collaboration diagram for SavingsAccount:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SavingsAccount (string o, double ir)
 A constructor that constructs a Savings account on the basis of an owner and the interestrate. The balanced defaults to 0.0.
 SavingsAccount (string o, decimal b, double ir)
 A constructor that constructs a SavingsAccount on the basis of an owner, balance, and the interestrate.
override void Withdraw (decimal amount)
 Withdraw an amount from the savings account.
override void AddInterests ()
 Add the annual interest to the savings account. This may increase the current balance of the account.
override string ToString ()
 Return a text string that represents this account for output purposes.

Detailed Description

A specialization of BankAccount for saving purposes.

Definition at line 6 of file savings-account.cs.


Constructor & Destructor Documentation

SavingsAccount.SavingsAccount ( string  o,
double  ir 
)

A constructor that constructs a Savings account on the basis of an owner and the interestrate. The balanced defaults to 0.0.

Parameters:
o The owners name
ir The interestrate

Definition at line 13 of file savings-account.cs.

SavingsAccount.SavingsAccount ( string  o,
decimal  b,
double  ir 
)

A constructor that constructs a SavingsAccount on the basis of an owner, balance, and the interestrate.

Parameters:
o The owners name
b The initial balance of the account
ir The interestrate

Definition at line 22 of file savings-account.cs.


Member Function Documentation

override void SavingsAccount.AddInterests (  )  [virtual]

Add the annual interest to the savings account. This may increase the current balance of the account.

Reimplemented from BankAccount.

Definition at line 41 of file savings-account.cs.

References BankAccount.balance, and BankAccount.interestRate.

override string SavingsAccount.ToString (  ) 

Return a text string that represents this account for output purposes.

Reimplemented from BankAccount.

Definition at line 50 of file savings-account.cs.

References BankAccount.balance, and BankAccount.owner.

override void SavingsAccount.Withdraw ( decimal  amount  )  [virtual]

Withdraw an amount from the savings account.

Parameters:
amount The amount withdrawn
Exceptions:
Exception In case of insufficient funds an exception is thrown

Reimplemented from BankAccount.

Definition at line 30 of file savings-account.cs.

References BankAccount.balance.


The documentation for this class was generated from the following file:

Generated on Thu Nov 5 13:38:16 2009 for BankAccounts with inheritance by  doxygen 1.6.1