Question: C# Programming: A commercial Bank wants to develop a C# application which will contain several classes. Among them, your responsibility is to develop the basic
C# Programming:
A commercial Bank wants to develop a C# application which will contain several classes. Among them, your responsibility is to develop the basic Account class with the specifications below:
| Fields |
|
| Properties |
|
| AccountId | // read only property |
| accountNumber | // read only property |
| OwnerName |
|
| Balance |
|
| Constructor |
|
| Account(accountNumber, OwnerName) | //initializes all the member variables // accountId is auto-genarated (format: [current_year].[month].[count]) (Example: 2016.06.1, 2016.06.2, etc.) //balance should be initialized to zero |
| Methods |
|
| Credit(amount) | //adds a valid amount to the balance |
| Debit(amount) | //subtracts a valid amount from the balance |
| Transaction(toAccount, amount) | //a valid amount is deposited to toAccount |
| CheckBalance() | //returns balance of an account |
Note-1: Do not add any extra member to the class
Note-2: Need to implement the main method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
