CS 230 Spring 2007                                          Assignment 6 – More Looping                                                         100 points

 

Assigned: 02/28/2007

Due: 03/14/2007 at the start of class

 

Pre-Lab (Do Before Lab):  Bring materials – a way to save a copy for you and a copy to turn in. Plan out tasks, objects, and events needed for program. Write pseudocode for the main button.

Main Assignment:

We’re going to implement a credit card simulation program. Write a program that shows month-by-month how long it takes to pay off a credit card balance when only paying the minimum payment each month.  Get from the user the amount borrowed and the annual  interest rate to be paid.  Display in a RichTextBox for each month elapsed, the number of months elapsed to that point, the interest owed that month, the minimum payment (see below), and the new balance (after interest has been charged and minimum payment paid).  After the balance has been paid off, display in labels or read-only textboxes the total number of months needed to pay off the balance and the total amount paid over the course of that time. NOTE – this task MUST be done with a loop – I need to see the month by month results in the text box – and in order to see that, you cannot do a single one-time calculation. 

·         Provide capabilities to simulate, clear (the inputs and outputs) to start again, and to exit.

Hand in:

Task Details:

·         Hint: Can you use a “for next” loop? (Do you know when you reach the top of the loop how many times it will need to go around?)

·         The annual interest rate should be entered as a decimal instead of a percent (this makes your job a little easier).

·         The interest rate is annual, but in doing your monthly calculations, you don’t get a full year’s worth of interest in a month!  Assume months are equal length to keep this simple. If any questions, please ask!!!  Your calculations need to meet the requirements of the task.

·         The minimum payment is determined as follows –

·         In general, the minimum payment is enough to pay the current interest plus 1 percent of the current balance (e.g. with $1000 owed and .12 interest rate, interest is $10, and 1% of the balance is $10, so the minimum payment is $20)

·         However, the lowest minimum payment allowed is $10, unless …

·         The minimum payment never is higher than paying off the whole remaining balance.

Miscellaneous