CS 230 Fall 2009                                Assignment 10 – Developing and using test cases for a program           50 Assignment points

Assigned: 11/17/2009

Due: 11/23/2009 at the start of class  

 

IT IS NOT APPROPRIATE TO GET ANSWERS FROM CLASSMATES ON THIS ASSIGNMENT!! WORK INDIVIDUALLY !!!!!

 

Pre-Lab (Do Before Lab):  None – Attend start of lab on 11/17 – when testing strategy will be discussed!

 

Main Assignment:

There is a buggy version of a program, named CollegeCostWrong, available in the assignments page of my WWW site (Look under Assignments at www.lasalle.edu/~redmond/teach/230  and under Blackboard). Save it to disk and if I ended up zipping it to put it on the WWW, unzip it. The program is described below. However, this version has bugs. Your mission is to test it, so you can notify the developer which test cases provide incorrect results. The skills learned here can also be useful for testing your own programs.

 

What I want from you is (submitted to Blackboard as either a Word or Excel file):

 

1)       The answer to: How many test cases (runs through the program) are necessary to thoroughly and completely test the program? EXPLAIN YOUR ANSWER!!! 

2)       Tell me what runs you did. Indicate which test cases gave correct results and which exposed flaws in the program. Using table form would be helpful! Vague or broad descriptions are not sufficient.

 

You DO NOT have to determine what the problem(s) are or how to fix them. The focus of this assignment is on catching bugs. My plan is to only provide you the executable; you will not be able to see the code in order to fix it at all.

 

Ok, here's the application description (Hmm, this sounds kinda familiar):

 

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

600

1200

Next 9 Credits

200

500

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 $5000.  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!!!

 

Note that everything above was taken from a description of a task for a previous assignment. It is not your task. You are not developing anything! Your task is to use test cases to gather evidence about problem(s)!! The skills learned here can also be useful for testing and debugging your own programs.