Problem

(Modify the Loan class) Rewrite the Loan class in Listing to add two static functions for...

(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

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT