Question
For this assignment please complete the following exercise. Submit your completed source code (*.cpp) and screenshots demonstrating you successfully ran the program by the due
For this assignment please
complete
the
following exercise. Submit
your completed
source code
(*.cpp) and screenshots
demonstrating you successfully ran the program by the due date.
========
Mortgage Class
Design a class
that will represent a
home mortgage. The constructor should accept the loan
amount, interest
rate,
and
number of years
to pay off the loan.
The class
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.
The monthly
payment with interest
compounded
monthly can be calculated as follows:
where
Payment = the monthly payment
Loan = the dollar amount of the loan
Rate
= the annual interest rate
Years =
the number of years
of the
loan
Utilize the class in a complete program. Run the
program at least
three times with
different
values to
demonstrate it works correctly.
Input Validation: Do not accept negative numbers for any of
the
loan values.
values to
demonstrate it works correctly.
Input Validation: Do not accept negative numbers for any of
the
loan values.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started