Question
Please write a C++ program to generate a detail loan payment report from the first month until the loan balance becomes zero or less than
Please write a C++ program to generate a detail loan payment report from the first month until the loan balance becomes zero or less than ten cents.
You have just purchased a stereo system that cost $1000 on the following credit plan (as test case #1):
No down payment, annual simple interest rate of 18.00% (and hence 1.50% per month or 0.015 per month), and monthly payments of $50.00. The monthly payment of $50.00 is used to pay the interest and whatever is left is used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $1000 in interest, which is $15.00. So, the remaining $35.00 (=$50.00 -$15.00) is deducted from your loan balance, which leaves you with a debt of $965.00 (=$1000.00 - $35.00). The next month, you pay interest of 1.5% of 965, which is $14.48. Hence, you can deduct $35.52 (=$50.00 - $14.48) from your loan balance.
You may use the while loop such as: while (loanBalance >= monthPayment).
When the loanBalance is less than the monthPayment, you need to compute the final payment amount, which should be the loanBalance plus its interest of one month.
For example, if your last-months loan balance is $47.12, which is less than the monthly payment of $50.00, then its final payment should be $47.83 because $47.12 plus its interest $0.71 (= 47.12 * 0.015) is $47.83.
Please make sure that your report is very user-friendly and very professional.
Your report must first show the following headline: (for test case #1)
Loan amount: $1000.00 Annual Interest Rate: 18.00% Monthly Payment: $50.00
Your report must then show the following 5 columns for each months payment until the loan balance is equal to 0 or less than 0.10:
Month # // Start from 1 for first month, 2 for second month, and so on
Month-Payment // Same for every month until the very last payment to pay off the loan balance
Interest-Paid // current-Loan-Balance * Monthly-Interest-Rate
Debt-Paid // Monthly-Payment Interest-Paid
Loan-Balance // Last-Month-Loan-Balance Debt-Paid
Your report must have the following line at the end to show the total interest amount paid:
Total Amount of Interest Paid: $______________
========================================================================.
You must run the following 3 test cases for this assignment.
Your test case #1 is:
Loan amount: $1000.00 Annual Interest Rate: 18.00% Monthly Payment: $50.00
Your test case #2 is:
Loan amount: $1000.00 Annual Interest Rate: 18.00% Monthly Payment: $100.00
Your test case #3 is:
Loan amount: $1000.00 Annual Interest Rate: 18.00% Monthly Payment: $180.00
=========================================================================.
Your loan payment report for test case #1 must look as follows:
Welcome to the program of "you" !
Loan amount: $1000.00 Annual Interest Rate: 18.00% Monthly Payment: $50.00
Month# Month-Payment Interest-Paid Debt-Paid Loan-Balance
---------- ------------------- -------------------- ----------------------- ------------------
1 $50.00 $15.00 $35.00 $965.00
2 $50.00 $14.48 $35.52 $929.48
- - -
21 $50.00 $2.86 $47.14 $143.53
22 $50.00 $2.15 $47.85 $95.68
23 $50.00 $1.44 $48.56 $47.12
24 $47.83 $0.71 $47.12 $0.00
Total Amount of Interest Paid: $197.83
Thank you for using this tool designed by "you"
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