Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Please show .cpp and .h separate in visual studio. Thank you. Create a C++ program that does the following: Creates a SavingsAccount class Uses

C++ Please show .cpp and .h separate in visual studio.

Thank you.

Createa C++ program that does the following:

  • Creates aSavingsAccountclass
  • Uses a static data member,annualInterestRate, to store the annual interest rate for each of the savers
  • Ensures each member of the class contains a private data member,savingsBalance, indicating the amount the saver currently has on deposit
  • Develops a member function,calculateMonthlyInterest, to calculate the monthly interest by multiplying thesavingsBalancebyannualInterestRate divided by 12; this interest should then be added tosavingsBalance
  • Develops a static member function,modifyInterestRate, that sets the staticannualInterestRateto a new value
  • Instantiates two different objects of classSavingsAccount,FirstsaverandSecondsaver, with balances of $1000.00 and $2000.00, respectively; set theannualInterestRateto 2 percent
  • Calculates the monthly interest and prints the new balances for each of the savers
  • Sets theannualInterestRateto 3 percent, calculates the next month's interest, and prints the new balances for each of the savers

Includethe proper header and make sure you properly comment your program. Also, make sure you use proper coding conventions.

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_2

Step: 3

blur-text-image_3

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions