CS 302 Data Structures

Fall 2012

Programming Assignment 1

Due on Wednesday, Sep 19 at 1:00 pm

Create a C++ program that simulates a mortgage calculator.† Here is the formula

Monthly payment = [ Amount * Monthly Interest * (1 + Monthly Interest)number of payments ]† / [ (1 + Monthly Interest)number of payments - 1 ]

This objectís calculate method takes the following data as input:

and returns the monthly payment.

Write a driver program for this object that prompts for and reads in the data (loan amount, number of payments, and interest rate) and calls the calculate method.

The output to the driver is as follows:

Repeat the process until 0.0 is entered for the loan amount.

Test Plan: † You must submit a test plan as documentation within your program.† That is, you must include a section that describes the testing that you did to ensure that the program is correct.


  1. A listing of your program
  2. A listing of your test plan
  3. A listing of the output file from the test driver
  4. Completed schedule

Upload a single PDF or Word document to WebCampus.