Write a program to keep track of how much money you owe after each payment on a loan. SPECIFICATION Your program will input the initial loan amount. It will then ask if you are a regular customer (R) or a preferred customer (P). Regular customers get an (APR) of 10%; preferred customers get an APR of 8%. This will determine the daily percentage rate for the duration of the loan. The program should then accept payments until the loan is paid in full, and then report: - How many payments it took to pay the loan - Total interest that was paid - Any money returned from the final payment if you overpaid SAMPLE OUTPUT Enter the amount of the loan: <1000> Are you a regular customer (r) or a preferred customer (p)? You must enter 'r' for regular or 'p' for preferred. Are you a regular customer (r) or a preferred customer (p)? The interest rate is 10% APR compounded daily, or 0.02740% daily. On day#1, you owe $1000.00. For payment #1, enter the day on which you will pay and the payment amount. <30 -100> ERROR: Your payment amount must be positive. For payment #1, enter the day on which you will pay and the payment amount. <30 500> On day#30, you owe $507.97. For payment #2, enter the day on which you will pay and the payment amount. <15 500> ERROR: You must apply a payment on or after day #30. For payment #2, enter the day on which you will pay and the payment amount. <60 500> On day#60, you owe $12.17. For payment #3, enter the day on which you will pay and the payment amount. <90 500> $487.73 of your final payment will be returned after covering the remaining balance of your loan. You paid off your loan after 90 days in 3 payments. You paid $12.27 in interest. EXAMPLE TEST CASES - For a regular customer with an initial loan amount of $1000, apply payments of $500 on day 30, day 60, and day 90. - For a preferred customer with an initial loan amount of $456.78 apply payments of $159.98 on day 30, day 35, and day 90. - Show the program correctly handling all error checking cases above. - source code .cpp file You must use switch, do, and for statements as appropriate.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
4)- source code .cpp file You must use switch, do, and for statements as appropriate. 5)ERROR CHECKING - Ensure that the initial amount of the loan is positive - Ensure that user enters preferred or regular customer correctly - Ensure that the payment amount is positive - Ensure that the current payment is being applied on or after the day the last payment was applied
The Programs need to run in Visual C++ on a Windows XP system.