Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 . fr Analyze Mortgage [ ESE | ) | Amount of loan: 2 4 0 0 0 0 Interest rate: ( suchas 5 .

3.
fr Analyze Mortgage [ESE
|
)
|
Amount of loan: 240000
Interest rate:
(suchas 5.25)
6
Duration in months: 360
Monthly payment:
|
FIGURE 4.22
Total interest paid:
En
i
~~
~~
$1.438.92
$278,011.65
1]
)
Possible output for Practice Problem 3.
Write a program to analyze a mortgage. See Fig. 4.22. The user should enter the amount of
the
loan, the annual percentage rate of interest, and the duration of the loan in months.
When the user clicks on the button, the information that was entered should be checked to
make sure it is reasonable. If bad dara have been supplied, the user should be so advised.
Otherwise, the monthly payment and the total amount of interest paid should be displayed.
The formula for the monthly payment is
payment = p*5/(1(1+ r)"(n)),
where p is the amount of the loan, r is the monthly interest rate (annual rate divided by 12)
given as a number between 0(for 0 percent) and 1(for 100 percent), and n is the duration
of the loan in months. The formula for the total interest paid is
total interest = n* payment pb.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Privacy In Statistical Databases International Conference Psd 2022 Paris France September 21 23 2022 Proceedings Lncs 13463

Authors: Josep Domingo-Ferrer ,Maryline Laurent

1st Edition

3031139445, 978-3031139444

More Books

Students also viewed these Databases questions