CS 150 - Intro to Programming - Fall 2001

| CS150 | Labs | Projects | Assignments | CodeSamples | Help Resources | Style Guide |


Programming Project 3 - 15 points

Due: Thursday Octobet 18th by 2:30pm

Design, implement and test a C++ program that prints a payment schedule for a debit and/or prints a loan payment amount. The program will present the user with a menu of choices, then carry out the request and print the results. The program will run until the user decides to quit.

Sample program run - User input in bold


Welcome to the Loan Program
Choose one of the following:
S to print a loan schedule
P to calculate monthly payment
E to Exit
Choice: S

Enter loan amount   : 1000
Enter interest rate : 10
Enter payment amount: 100
Payment   Balance  interest   principle
  1       1008.33      8.33       91.67
  2        915.90      7.57       92.43
  3        822.70      6.80       93.20
  4        728.72      6.02       93.98
  5        633.96      5.24       94.76
  6        538.41      4.45       95.55
  7        442.07      3.65       96.35
  8        344.92      2.85       97.15
  9        246.96      2.04       97.96
 10        148.18      1.22       98.78

Final Payment of : 48.18
/***************************************************/
Welcome to the Loan Program
Choose one of the following:
S to print a loan schedule
P to calculate monthly payment
E to Exit
Choice: P

Enter loan amount   : 100000
Enter interest rate : 7.5
Enter years: 15
Your Payment would be: $927.01 per month
/***************************************************/ 



Your program must use functions to print the menu, calcluate the payment schedule, and calculate a monthly payment. You should be able to use your code from programming project 2 to print the payment schedule. The formula for calculating a monthly payment (p) is:

p = m * ( (1 + r/12)12n * (r/12) ) / ((1 + r/12)12n -1);

where m is the amount of the loan, r is the annual interest rate (in decimal form), and n is the number of years in the mortage. For example, a 30 year loan of $105,000 at 11.5% (r = 0.115) results in a monthly payment of $1039.81 - a 15 year loan of $100,000 at 7.5% (r = 0.075) results in a monthly payment of $927.01

Additional Requirements:

Notes:


What to Turn In:

electronic version files: Due:

paper version: Due: Thursday October 18th by 2:30pm