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

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!