CS 1054: Project 3: Using Control Statements (Summer 2005)

You will start writing a complete program for this third programming project. The program requires you to get some user input and then perform some calculations using those input values.

Problem description (Programming problem 3.26 from textbook)

Write a program that lets the user enter the loan amount and loan period in number of years and then displays the monthly and total payments for each interest rate from 5% to 8%, with an increment of 1/4. The formula that you use for performing the calculations are as follows:

where

and the total payment is simply the product of montly payment and the number of months in the loan period.

Sample input and output

Sample input and output is shown below. The green text indicates the prompts that should be displayed for the user. The red numbers indicate the values that the user entered. The remaining text is the output produced by the program. Your program should print out your name instead of the instructor's.
Enter the loan amount: 10000

Enter the number of years: 5

Programmer: Mir Farooq Ali
CS 1054 Summer I 2005 Project 3

Loan amount: $10000.00
Number of years: 5

=============================================
Interest Rate Monthly Payment Total Payment
=============================================
 5.00%         188.71          11322.74
 5.25%         189.86          11391.59
 5.50%         191.01          11460.70
 5.75%         192.17          11530.06
 6.00%         193.33          11599.68
 6.25%         194.49          11669.56
 6.50%         195.66          11739.69
 6.75%         196.83          11810.08
 7.00%         198.01          11880.72
 7.25%         199.19          11951.62
 7.50%         200.38          12022.77
 7.75%         201.57          12094.18
 8.00%         202.76          12165.84
=============================================

Hints and suggestions

Additional samples of input and correct output are available on the course website.

Evaluation

Your program will be submitted to the Curator system. You will have five submissions. You will not be given more submissions for any reason! Your submitted program will be graded by the GTA. There will be no automatic grading for any project in this course. You will receive your grade via email from the class account cs1054@cs.vt.edu in the form of a grade-sheet. This project will be evaluated for style and design as well as correctness. Make sure you follow the standard Java conventions for indentation, variable names and documentation in your program. Look at programs 1 and 2 for examples of acceptable documentation. 60 of the 80 points will be correctness, while 20 points will be for style and documentation.

Submitting your Program

As indicated earlier, you will submit this assignment to the Curator System (read the Student Guide). Instructions for submitting are contained in the Student Guide. You will be allowed up to five submissions for this assignment. Use them wisely. Test your program thoroughly before submitting it. It is advisable to show your program to the instructor or the TA to make sure it works correctly before submitting it. Make sure that your program produces correct results for every sample input file posted on the course website. The Student Guide can be found at: http://www.cs.vt.edu/curator/

Program Compilation

Your program must compile and run under JDK 1.5.

Pledge

Every program submission for this class must include an Honor Code pledge. Specifically, you must always include the following pledge statement in the header comment for your program:

/****************************************************************************
 *
 * On my honor:
 *
 * - I have not discussed the Java language code in my program with
 * anyone other than my instructor or the teaching assistants
 * assigned to this course.
 *
 * - I have not used Java language code obtained from another student,
 * or any other unauthorized source, either modified or unmodified.
 *
 * - If any Java language code or documentation used in my program
 * was obtained from another source, such as a text book or course
 * notes, that has been clearly noted with a proper citation in
 * the comments of my program.
 *
 * - I have not designed this program in such a way as to defeat or
 * interfere with the normal operation of the Curator System.
 *
 * Your Name
 * Your PID
****************************************************************************/

Failure to include this pledge in a submission is a violation of the Honor Code.
© Mir Farooq Ali 2005.