(Modify the Loan class) Rewrite the Loan class in Listing to add two static functions for computing monthly payment and total payment, as follows:
double getMonthlyPayment(double annualInterestRate, int numberOfYears, double loanAmount)
double getTotalPayment(double annualInterestRate, int numberOfYears, double loanAmount)
Write a client program to test these two functions.
#ifndef LOAN_H#define LOAN_H
class Loan{public :Loan(); Loan(double rate, int years, double amount); double getAnnualInterestRate(); int getNumberOfYears(); double getLoanAmount(); void setAnnualInterestRate(double rate); void setNumberOfYears(int years); void setLoanAmount(double amount); double getMonthlyPayment(); double getTotalPayment();
private : double annualInterestRate;
int numberOfYears; double loanAmount;
};
#endif
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.