Question: COMP 2710: Project 1 Points Possible: 100 Deadline: 11:59pm CST Friday January 29th 2021 Note: You do not need to submit hard copies. Goals: To

 COMP 2710: Project 1 Points Possible: 100 Deadline: 11:59pm CST FridayJanuary 29th 2021 Note: You do not need to submit hard copies.

COMP 2710: Project 1 Points Possible: 100 Deadline: 11:59pm CST Friday January 29th 2021 Note: You do not need to submit hard copies. Goals: To learn how to implement the concept of "Flow of Control" in C++ To write a very simple C++ program Month Balance Payment Rate Interest Principal $1000.00 N/A $965.00 550.00 1.50 $13.00 $35.00 2 $929.47 $50.00 1.50 $14.45 $35.53 3 $893.42 $50.00 1.30 $12.94 $36.06 $856.82 550.00 1.30 $13.40 836.60 $819.67 550.00 1.50 $12.85 837.15 $781.97 550.00 1.30 $12.30 $37.70 $743.70 850.00 1.50 $11.73 $38.27 $704.05 850.00 1.30 $11.16 $38.84 $665.42 850.00 1.30 $10.57 $39.42 $623.40 550.00 1.30 $9.98 $40.02 $584.79 S50.00 1.50 $9.38 540.62 $543.56 850.00 1.50 $8.77 541.23 5501.71 850.00 1.50 8.25 841.85 550.00 1.50 $7.53 $426.13 550.00 1.50 $6.09 843.12 $372.37 550.00 1.50 $6.24 $43.76 $327.95 850.00 1.50 $5.59 $44.42 $282.87 S50.00 1.50 $4.92 545.08 $237.11 550.00 1.50 $4.24 845.76 $190.67 550.00 1.50 $3.56 21 $143.53 850.00 1.50 $2.86 547.14 22 $95.68 890.00 1.30 $2.23 $47.85 547.12 850.00 1.50 $1.44 $0.00 547.83 1.50 $0.71 $47.12 Descrip.on: You have just purchased a stereo system that cost $1000 on the following credit plan: no down payment, an interest rate of 18% per year (and hence 1.5% per month), and monthly payments of $50. The monthly payment of $50 is used to pay the interest, and whatever is lep is used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $1000 in interest. That is $15 in interest. The remaining $35 is deducted from your debt, which leaves you with a debt of $965.00. The next month you pay interest of 1.5% of $965.00, which is $14.48. Hence, you can deduct $35.52 (which is $50-$14.48) from the amount you owe. write a program that will tell you how many months it will take you to pay off this loan in par[cular and any loan in general. Your program also needs to calculate the total amount of interest paid over the life of any loan. Use a loop to calculate the amount of interest and the size of the debt aper each month. Your program must output the monthly amount of interest paid and remaining debt. Use a variable to count the number of loop itera[ons and hence the number of months un[l the debt is zero. You may want to use other variables as well. The last payment may be less than the monthly payment, therefore should be calculated based on the amount leP in balance (instead of monthly payment). And do not forget the interest. If you owe $50, then your monthly payment of $50 will not pay off your debt, although it will come close. One month's interest on $50 is only 75 cents. Here is a sample dialog (where the user input is depicted as Bold, but you do not need to display user input in bold.) Both number formats: 1234.55 and 1,234.56 are accepted: It takes 24 months to pay ott the loan. Total interest paid 12: $197.83 Your program's output should match the style of the sample output (including a les lined-up style). In what follows, you find a second case used to test the correctness of your program. Loan Anunt: 2000 Interest Rate (5 per year): 12 Monthly Paymenta: 80 Loan Anunt: 1000 Interest Rate (5 per year): 18 Monthly Paynenta: So Lortization Fable Amortisation Table 3. Your program should check if the loan amount and monthly payment are posiHve numbers and interest rate is a non-negative number. If encounters a 0, negalve number, or a char, your program should prompt the user to enter another input. 4. If you do not address the above issues, your program may not terminate in some special cases and you will lose marks. See the example below: X/A Loan Amount: 2000 Interest Rate (t per year): 49.2 Monthly Paymenta: 80 Anortization Table Month Balance Paydent Rate Interest Principal $2,000.00 X/X $1,940.00 $80.00 1.00 $20.00 560.00 $1,879.40 $20.00 1.00 $19.40 560.60 3 $1,818.19 $80.00 1.00 $18.79 561.22 51, 756.30 $80.00 1.00 $18.11 561.02 $1,693.94 $80.00 1.00 $17.SE $1,630.88 $80.00 1.00 $16.94 563.06 51,567.19 $80.00 1.00 $16.31 563.69 a $1,502.86 $20.00 1.00 $13.57 $64.33 9 51,437.89 $80.00 1.00 $15.03 564.97 10 $1,372.27 $80.00 1.00 $14.38 65.62 11 $1,305.99 $80.00 1.00 $13.72 866.20 12 61,239.05 $80.00 1.00 $13.06 566.94 13 51,171.44 $80.00 1.00 $12.39 567.61 $1,103.15 $20.00 1.00 $11.71 S68.29 15 51,034.19 $80.00 1.00 $11.03 $63.97 15 $964.53 $80.00 1.00 510.34 569.66 17 5894.17 $80.00 1.00 $9.65 570.35 18 $223.11 $20.00 1.00 58.94 571.06 19 5751.25 $20.00 1.00 58.23 571.77 20 $678.86 $80.00 1.00 67.51 572.49 21 5605.65 $80.00 1.00 56.79 573.21 22 6531.70 $80.00 1.00 $6.06 $73.94 5457.02 $20.00 1.00 $5.32 574.68 $382.59 $80.00 1.00 54.57 575.43 25 6305.41 $20.00 1.00 53.82 576.18 26 $228.46 $80.00 1.00 53.05 576.95 27 $150.75 $80.00 1.00 52.28 577.72 28 572.25 $20.00 1.00 51.31 578.49 29 $0.00 $72.98 1.00 $0.72 $72.25 Month Balance $2,000.00 $2,002.00 $2,004.08 $2,006.25 $2,008.53 $2,010.85 $2,013.30 $2,015.84 52,018.49 $2,021.25 $2,024.12 $2,027.11 $2,030.22 52,033.46 $2,036.84 52,040.35 $2,044.00 $2,047.80 $2,051.76 $2,055.89 Paynent Rate Interest Pinespal X/X X/ N/A $80.00 4.10 $82.00 -$2.00 $20.00 4.10 $22.08 -$2.08 $80.00 4.10 $82.17 -$2.27 $80.00 4.10 582.26 -$2.26 $20.00 4.10 $82.35 -$2.35 $80.00 4.10 $82.45 -$2.45 $80.00 4.10 $82.55 -$2.55 $80.00 4.10 $82.65 -$2.65 $80.00 4.10 $82.76 -$2.76 10 $80.00 4.10 $82.87 -82.87 $20.00 4.10 $22.99 -$2.99 $80.00 4.10 $83.11 -$2.12 $20.00 4.10 $83.24 -83.24 $80.00 4.10 $83.37 -53.37 $80.00 4.10 $83.si $80.00 4.10 $83.55 $80.00 4.10 $83.80 -63.80 $80.00 4.10 $83.96 -$3.96 $80.00 4.10 $84.12 -$4.12 It takes 29 months to pay of the loan. Total interest paid sa: 8312.98 Special Cases: 1. Please think about how to deal with the last payment, which is smaller than regular payment. For example, in the above table, the regular payments are $80.00 whereas the last payment is only 72.98. 2. Your program needs to ensure that regular payments are larger than any monthly interest. For example, in the above amor(za[on table, your program must test if the regular monthly payment (i.e., 580.00) is larger than the monthly interest (e.s. $20.00 in the first month), otherwise your program should ask for a larger monthly payment. Programming Environment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!