Question: Write an application that creates different bank accounts. You have to design an object-oriented solution using two classes written in C#. BankAccount class: Variables (Attributes):

Write an application that creates different bank accounts. You have to design an object-oriented solution using two classes written in C#.

BankAccount class:

Variables (Attributes):

first name

last name

yearly interest rate

balance

Functions (Methods):

default constructor

constructor with one parameter (yearly interest rate)

properties

BankAccountTest class: instantiate two objects of the BankAccount class, checking and saving accounts and use the constructor to initialize the yearly interest rate for each account (0.5% for checking account, 2.3% for saving account). Allow the user to input his/her name and the balances for both accounts. After the user inputs all the data, the program displays users name and initial balances for both accounts. Then, the program calculates the balances with the interest after one year and updates the balances for both accounts (objects) and displays the new balances for both accounts. Repeat the step for two years of balance and display the new balance after two years for both accounts.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!