Question: link http://cs.ucsb.edu/~cspensky/teaching/cs16/cs16/SavitchCPP9_LabManual/lab6/act2.html Exercise 6.3 Modify the class loan and include the monthly_payment as a data member in that class. Also, add a new function called

link http://cs.ucsb.edu/~cspensky/teaching/cs16/cs16/SavitchCPP9_LabManual/lab6/act2.html

Exercise 6.3 Modify the class loan and include the monthly_payment as a data member in that class. Also, add a new function called add_loans, defined as:

float add_loans(Loan loan1, Loan loan2); Note that you still have the payment function that computes the payment. Since you include the monthly_payment as a member, instead of returning a value from the function, you directly set the value for monthly_payment in that function. The new function, add_loans, takes two loan objects and computes the total monthly payment, i.e., the sum of monthly payments of the two loans. Call your new program ex63.cpp.

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!