Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions