Events & Delegates: 1. Define Cbanking Class With Following Datamembers
1. Define a CBanking class with data members like account number, name, address, opening balance to store bank account details.
2. Take user input for the first four fields and display a menu for deposit or withdrawal transaction.
3. Perform transactions - deposit adds transaction amount to opening balance, withdrawal subtracts it. Events are raised if balance exceeds Rs. 100,000 for tax notification or drops below Rs. 5,000.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
23 views1 page
Events & Delegates: 1. Define Cbanking Class With Following Datamembers
1. Define a CBanking class with data members like account number, name, address, opening balance to store bank account details.
2. Take user input for the first four fields and display a menu for deposit or withdrawal transaction.
3. Perform transactions - deposit adds transaction amount to opening balance, withdrawal subtracts it. Events are raised if balance exceeds Rs. 100,000 for tax notification or drops below Rs. 5,000.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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