Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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: The output in a file is for the following case: C C:\Users\professorpcma\Desktop\Spring 2021\CIS 3100\Programming Assignments\assign2sol\Debug\assign2sol.exe Enter Loan amount (0-9999999), for example 300000.90: 600000 Enter annual interest rate(0-30), for example 4.25 meaning 4.25%: 2.375 Enter no. of years as integer(1-99), for example 30: 25 Enter additional principal per month (0-9999999), for example 300: 300 Send the mortgage amortization table to a file (enter file name): Assign2_LastName_FirstName.txt 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 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: The output in a file is for the following case: C C:\Users\professorpcma\Desktop\Spring 2021\CIS 3100\Programming Assignments\assign2sol\Debug\assign2sol.exe Enter Loan amount (0-9999999), for example 300000.90: 600000 Enter annual interest rate(0-30), for example 4.25 meaning 4.25%: 2.375 Enter no. of years as integer(1-99), for example 30: 25 Enter additional principal per month (0-9999999), for example 300: 300 Send the mortgage amortization table to a file (enter file name): Assign2_LastName_FirstName.txt 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

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions