1. Engineering
  2. Computer Science
  3. c program...

Question: c program...

Question details

C++ program

Design a class that determines the monthly home mortgage payment. The monthly payment with interest compounded monthly is calculated as follows rate rate 12 x years payment where term= (1 + term - 1 12 Note: payment - the monthly required payment loan -the dollar amount of the loarn rate- the 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 also have member functions for returning the monthly payment amount and the total amount paid to the bank at the end of the loan period. It should have a function named calculate, that calculates the monthly payment and stores the result in a member variable. Declare all member variables private and the constructor, getter and setter functions public. In the main, prompt for the required input values (do not accept negative values), create an object of the home mortgage class, set the values, and output the calculated monthly payment and total amount paid to the bank.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution