Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello i need help with writing this java program, i am confused on how to approach it thank you uestion 2 Write a program to

hello i need help with writing this java program, i am confused on how to approach it thank you image text in transcribedimage text in transcribedimage text in transcribed

uestion 2 Write a program to determine the mortgage insurance, loan amount and mortgage pavments for a person buying a house. The program should ask the user for the following things: (1) Asking price for the house (2) Loan amortization period in years (3) Interest rate offered by the bank (4) Down payment available with the user (5) Mortgage payments monthly (M/m) or bi-weekly (B/b) The mortgage insurance interest rates for various down payment ranges are mentioned below along with the formulae required to compute mortgage insurance, loan amount and mortgage payments. Mortgage Insurance Interest rate Down Payment Available with the Buyer 5%-9.99% 10%-14.99% 15%-19.99% 20% or higher 4.00% 3.10% 2.80% 0.00% Here is the formula to calculate the Mortgage Insurance: Mortgage Insurance (MI) (Asking Price - Down Payment)*Mortgage insurance interest For instance, if the asking price was 100,000$ and down payment was 10,000$, interest rate will be 3.10% and the mortgage insurance will be (100,000-10,000)*3.1-2,790$. The loan amount is then calculated as Loan Amount Asking Price - Down Payment Mortgage insurance 90,000 2,790 92,790$. The mortgage payments depend on loan amount, loan amortization period, interest rate offered by the bank (not the mortgage insurance interest rate), and whether the payments are made monthly or bi-weekly. Mortgage payments M L Mortgage payments M-L>X where, L is the loan amount, r is the monthly/bi-weekly interest rate (to be computed based on the yearly interest rate) and n is the number of payments COMP248/Winter 2019 - Assignment 2 Page 2 of 6 For instance, the loan amount calculated above is considered for amortization period of 25 years with bank providing 3.66% interest rate and the payments are done monthly then the mortgage payments will be computed as follows 92,790$ r (3.66/100)/12 -0.00305 n 25 12 300 0.00305.(1+0.00305)y00 472.53183$ 5 (1+0.00305) (1+0.00305)300-1 M 92,790 x In case of a b-weekly payment mode, there are 52 weeks in a year making 26 payments per year and n will become 25 26 650 and r will become (3.66/100)/26 0.00141 M 0.00141*(1+0.00141)650 92.790 (1+0.00141)650-1217.97621$ You need to force the user to enter minimum 5% down payment and correct character for mode of mortgage payments (i.e. M/m or B/b) by the use of loop construct in Java. Here are a few sample outputs to illustrate the expected behavior of your program Note; user input is highlighted in grey Mortgage Calculator Please enter the asking price for the house: 100000 Please enter the loan amortization period in years: 25 Please enter the interest rate offered by the bank: 3.66 Please enter the down payment amount in dollars:4500 Please enter the down payment amount in dollars: 10000 Please enter the mode of mortgage payments monthly (M/m) or bi-weekly (B/b): m You need to force the user to enter minimum 5% down payment and correct character for mode of mortgage payments (i.e. M/m or B/b) by the use of loop construct in Java. Here are a few sample outputs to illustrate the expected behavior of your program Note: user input is highlighted in grey. Mortgage Calculator Please enter the asking price for the house: 100000 Please enter the loan amortization period in years: 25 Please enter the interest rate offered by the bank: 3.66 Please enter the down payment amount in dollars: 4500 Please enter the down payment amount in dollars: 10000 Please enter the mode of mortgage payments monthly (M/m) or bi-weekly (B/b): m Mortgage Result Your mortgage insurance wil1 be $2790.0 Your total loan amount will be $9279e.0 Your mortgage payments will be $472.53183 Mortgage Calculator Please enter the asking price for the house: 100000 Please enter the loan amortization period in years: 25 Please enter the interest rate offered by the bank: 3.66 Please enter the down payment amount in dollars: 10000 Please enter the mode of mortgage payments monthly (M/m) or bi-weekly (B/b): V Please enter the mode of mortgage payments monthly (M/m) or bi-weekly (B/b): B Mortgage Result Your mortgage insurance will be $2790.0 Your total loan amount will be $92790.0 Your mortgage payments will be $217.97621

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

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions