Question: *using c++* Construct a class named Savings containing three floating-point data members named balance, rate, and interest and a constructor that initializes each data member
*using c++*
Construct a class named Savings containing three floating-point data members named balance, rate, and interest and a constructor that initializes each data member to 0. This class should be established with typical two files(.h and .cpp). Include a member function that inputs a balance and rate and then calculates an interest. The rate should be stored as a percent, such as 6.5 for 6.5%, and the interest is computed as interest = (balance)(rate/100). Add a member function to display all data member values. Use functions in main(), and display the results.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
