Date: Mon, 11 Nov 1996 17:36:18 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Tue, 05 Nov 1996 12:58:06 GMT Content-length: 6533 CS110: Program #1

Program #1 -- Automobile Financing Problem

This program is worth 20%.

Due Date

This assignment is due on Tuesday, Nov 12

Statement of the problem

You have been hired by an Automobile Financing Firm. The firm's policy is that the customer will pay an equal amount of money (A) each month until the loan is paid off. The monthly payment for any particular customer is based on the amount borrowed (B), the number of months (m) for the loan, and the annual interest rate (i) as in the following formula:

The formula is too complicated to view in text form; you need to see the picture

The amount of money borrowed (B) can be calculated as follows:

B = P-T-D

where P is the Purchase Price of the new car, T is the Trade-in-value of the new car and D is the Down Payment (the first large sum of money paid by the customer towards covering the price of the new car).

Your employer wants you you to write a C++ program to solve this problem, even though you've only been taking C++ for a week! The specifications of the problem are as follows:

Test Cases

To make sure your program runs correctly, your boss asks you to run it on the following test inputs.

What to turn in

You should turn in the following three pages, stapled together:

You will lose 2 points if items are not stapled. No exceptions!

Hints

Sample Run

To give you an idea about how your program must behave, I have provided you with a sample run of the program:
Enter price of the new car: 30000
Enter trade-in-value of old car: 12000.3
Enter Down Payment: 3000.14
Enter the annual percent rate: 12.35
Enter the period of the loan: 36
Amount borrowed: 14999.5
Total number of months: 36
Annual percent interest rate: 12.35
Monthly payment: 500.708
Total amount paid by customer over period of loan: 18025.5
Total interest earned over life of loan: 3025.99
Thanks for using TONY D'Silva's wonderful program!

Grading