You are on page 1of 1

EVENTS & DELEGATES

1.

Define CBanking Class with following datamembers:


i.
AccountNo
int
ii.
AccountName
string
iii.
Address
string
iv.
OpeningBalance.
double
v.TransactionType
string
vi.
TransactionAmount. double
vii.
CurrentBalance
double.
Take input from the user for the first four fields and then display a menu to the user for
transacntion.
1. Deposit
2. Withdrawal.
Now user can perform transactions on the account i.e of type Deposit or Withdrawal.
If TransanctionType is Deposit then
CurrentBalance = OpeningBalance + TransactionAmount.
If CurrentBalance >= 100000 then raise event saying below line:
Sir Since CurrentBalance more than 100000 Please pay 10% Tax on amount
more than 100000
If TransanctionType is Withdrawal then
CurrentBalance = OpeningBalance - TransactionAmount.
If CurrentBalance < 5000 then raise event saying below line:
Sir You must have Rs.5000/- at least in your account

You might also like