1. Engineering
  2. Computer Science
  3. c to be done in csharp we need to...

Question: c to be done in csharp we need to...

Question details

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.

Objects

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:

ccount 1 ccount Number 10 Unknown $e.00 Chequing Month End Display Account Number 1e Unknowrn $100.10 Chequing laking deposit of 150 ccount Number 1 Unknown $150.00 Chequing Account 2 Account Number 12345 Joe Green $0.00 Chequing aking withdrawal of 5e ccount Number 10 Unknowrn $100.00 Chequing Insufficient Funds for withdrawal Account Number 12345 Joe Green $e.e0 Chequing

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution