Question: c to be done in csharp we need to...
C# - to be done in C-Sharp
We need to create a Class that has 5 variables:
- clientAccID – unique identifier
- clientName – client's name
- clientBalance – current balance
- clientAccType – accType is an enumeration. Choices are Chequing, Savings , Other.
- interestRate – monthly rate (decimal)
Each of the above variables needs a getter and a setter method. Auto-implemented property can be used.
The Class will have 3 Constructors. All 3 must be implemented (even if a value is not passed into the constructor)
Private variable should be instantiated in a constructor (at least to a default value)
The class has one private and four public method as follows:
- withdrawing money - the application makes a withdrawal - after passing the withdrawal amount into the method. user notified if no sufficient funds
- depositing money - update the account balance after passing the deposit amount into the method.
- displaying - all info in the account should be displayed
- EndofTheMonthDisplay - call it when the you need to calculate the end of the month interest.
- calculatingTheInterest - should update the balance according to the interest amount.
Test class - create objects from the main method.
do the following:
- Create three accounts, different constructor each
- Make one withdrawal and one deposit and calculate the interest at the end of the month of the three accounts
Output - a portion of a sample: