LotteryAccount Class Reference

A specialization of BankAccount. More...

Inherits BankAccount.

Collaboration diagram for LotteryAccount:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LotteryAccount (string o, decimal b)
 Construct a lottery account based on owner o and the initial balance b.
override void AddInterests ()
 Add interest to the lottery account. This may be a lot if a drawn lottery number is the winning number. If not, zero interest is added.
override string ToString ()
 Return a text string that represents this account for output purposes.

Static Private Attributes

static Lottery lottery = Lottery.Instance(20)

Detailed Description

A specialization of BankAccount.

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


Constructor & Destructor Documentation

LotteryAccount.LotteryAccount ( string  o,
decimal  b 
)

Construct a lottery account based on owner o and the initial balance b.

Parameters:
o The owner of the account
b The initial balance of the account

Definition at line 14 of file lottery-account.cs.


Member Function Documentation

override void LotteryAccount.AddInterests (  )  [virtual]

Add interest to the lottery account. This may be a lot if a drawn lottery number is the winning number. If not, zero interest is added.

Reimplemented from BankAccount.

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

References Lottery.AmountWon(), BankAccount.balance, Lottery.DrawLotteryNumber, and lottery.

Here is the call graph for this function:

override string LotteryAccount.ToString (  ) 

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

Reimplemented from BankAccount.

Definition at line 31 of file lottery-account.cs.

References BankAccount.balance, and BankAccount.owner.


Member Data Documentation

Lottery LotteryAccount.lottery = Lottery.Instance(20) [static, private]

Definition at line 8 of file lottery-account.cs.

Referenced by AddInterests().


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