The National Bank of the Caribbean wants to have a car loan calculator designed and implemented using C++. You have been asked to design a class that will determine the monthly payment on a motor vehicle based on the total years allotted for the loan. The monthly payment with interest compounded monthly can be calculated as follows: loan* rate 0/12 * term , where term = 1+ rate /12 !"∗ %&'() Payment = the monthly payment Loan = the dollar amount of the loan Rate = the annual interest rate Years = the number of years of the loan The class should have member functions for setting the loan amount, interest rate, and number of years of the loan. It should have member functions for returning the monthly payment amount and the total amount paid to the bank at the end of the loan period. Implement the class in a complete program (loan.h, loan.cpp, driver.cpp)
Comments
Leave a comment