Question: Please code in C++ ASSIGNMENT 2-MORTGAGE AMORTIZATION TABLE This assignment is to use your knowledge of Chap 1-5 to generate the following amortization table in
Please code in C++


ASSIGNMENT 2-MORTGAGE AMORTIZATION TABLE This assignment is to use your knowledge of Chap 1-5 to generate the following amortization table in a file given user's input of loan amount, annual interest rate, term or number of years, and additional principal the borrower is willing to pay per month. You'll use the formula of the monthly Payment as follows: * monthly Payment (loanAmount annualInterest/12) / (1- 1/pow (1+annualInterest/12, numberOfYears*12)) Then, you can use the following formula to compute Principal, Interest and Balance for the ith month. Balance (0) = Loan Amount; Actual Payment = Monthly Payment + Additional Principal Interest (i) = Balance (i-1) * Annual Interest Rate/12; Principal(i) = Actual Payment - Interest (i) Balance (i) = Balance (i-1) Principal (i) When additional principal is greater than 0, it means that the loan will be paid off earlier than the loan term. So, your amortization table should end when the balance becomes zero or negative. So, when the balance is less than the actual payment, the next month's principal is the same as the previous month's balance, and it is the end of the amortization table. Your table (program output file) needs to follow the exact format as follows. Your program needs to accommodate a loan amount up to $9,999,999.00. Your program needs to be general enough to handle various user input errors, for example, zero or negative numbers or numbers are too big. The output in a file is for the following case: MORTGAGE AMORTIZATION TABLE Amount: Interest Rate: Term (Years): Monthly Payment: Additional Principal: Actual Payment: $600000.00 2.375% 25 $2654.09 $300.00 $2954.09 $ $ $ 1 2 3 4 5 6 Principal 1766.59 1770.08 1773.59 1777.10 1780.61 1784.14 Interest 1187.50 1184.00 1180.50 1176.99 1173.47 1169.95 Balance 598233.41 596463.33 594689.75 592912.65 591132.04 589347.90 256 257 258 259 260 261 2924.83 2930.62 2936.42 2942.23 2948.06 98.11 29.25 23.46 17.66 11.85 6.03 0.19 11855.45 8924.82 5988.40 3046.17 98.11 0.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
