CS 230 Fall 2006                                Lab Example

 

Goal – Create Test Cases and Test Program

 

here's the application description:

 

The Penn State – Germantown Campus (made up) has asked you to develop a program to calculate
(simplified) tuition and fees. You will need to get as input from the user the number of credits, and whether the student is “In State” or not, and whether the student will live in the dorms or not (checkboxes for each).  You will then need to calculated tuition and board and total costs. Tuition is according to the following scheme:

Per Credit Costs

In State

Out of State

First 12 Credits

500

900

Next 9 Credits

100

300

In addition, the state in an effort to encourage less pollution / demand on highways / more use of already paid for dorms, has decided to offer a 20% discount on tuition for any student who lives in the dorms.  The dorm cost is $4000.  For calculations, show Basic Tuition Cost, Discount (0 if none), Final Tuition, Dorm Cost (0 if not in dorm), and Total Cost as results.  In addition to the calculate capability, provide capabilities to clear all of the controls (text boxes and checkboxes) to start again, and to exit.

 

Details:

1.        The program should ensure that the user types in valid data (i.e. numeric data; credits no lower than 1, and no higher than 21). 

2.        Hopefully the summary information is self-explanatory. Any questions about what they are, please ask!!

3.        If you have any questions about the tuition scheme, please ask!!!