Write the ccp program, which calculates and displays payments of a loan. The loa
ID: 3656011 • Letter: W
Question
Write the ccp program, which calculates and displays payments of a loan. The loan is a equal instalments loan, which means that that the Interest amount decreases as the principal amount gets lower. You may assume monthly payments and that the monthly interest persentage is equal to intersts for one year / 12. The list shall look as follows
You shall write this program in the following way:
1) Write a class called Loan.
2) The Loan class has no more than three member variables which are all
private: principal amount, annual interest rate and number of instalments (or
number of payments).
3) Write a. constructor) for the Loan.class.
4) The Loan:class shall have the following member functions:
a. The function computeInstalment() which returns the instalment. The function is
a private function.
b. The function computeBalance(int numPayment) which returns the balance
before payment number numPayment. The function is a private function.
c. The function computeInterest(int numPayment) which retunes the interest
amount of the payment number numPayment. The function is a private function.
d. The function displaySchedule() which prints the payment schedule. The
function is a public function.