Gift - the Design and some Test Cases
CS 330 - Fall 2010 - Dr. Hutchens

Due September 16, 2010

Goals
- to practice using procedural dataflow design techniques
- to develop some test cases
- to think about the gift problem before you develop it

Overview
For this lab, you are to use the procedural dataflow design approach to analyze and design the software described in another handout. You should also develop test cases as described below. You must hand in on paper:
    (1) a dataflow diagram, DFD, for the Gift program (50%)
    (2) a structure chart for the Gift program (15%)
    (3) a set of five test cases for Gift with justification (35%)
The diagrams should be neatly written or done with a drawing program. The test cases should be written neatly or typed.

Half of your grade is on the proper use of the notation; half is on how complete and correct they are. Neatness counts in that I must be able to read your diagrams. I will not grade every little aspect of the diagrams. I will choose one or two data items and see if I can trace them through your diagrams.

If you want me to look at your diagrams before they are due, you can bring them to me at office hours. You may also email them to me. JPG files are good as attachments, but I can read a lot of graphics formats. You will turn in paper.

Dataflow Diagram and Structure Chart
Refer to your notes and handouts concerning proper notation for dataflow diagrams and structure charts. Be sure that you are showing where the data flows. This should not be a control flow diagram. The software isn't really transforming or transacting. But it is moving the data around. Remember that the processes can be thought of as acting independently.

These diagrams do not need to be huge. Yours will probably have fewer than ten processes. The nodes are processes. The arcs are data. Be careful with your notation.

The structure chart should show in a somewhat hierarchical way how the functions are grouped and call each other. There is no data on the lines between functions. Spend more time on your dataflow diagram; it's more important.

Test Cases
Although testing occurs during and after implementation, thinking about test cases now may help you think about the problem. For this part of the assignment, develop at least five test cases and describe in English why you chose them (what potential bugs you hope the tests will uncover). Present the test cases in a table much like this:

Input Output Potential Bugs to Uncover
empty file no inventory and nothing to add garbage instead of empty inventory
one item in inventory
1.36 Cheap card
then user asks to add with
a 1
inventory list of one item
 
message that 1 is illegal item number and nothing is added to the basket
inventory not read properly
1 incorrectly referring to first item in inventory
lower case 'a' not considered an add request

Remember that the goal of testing is to uncover bugs and that a good test case has the potential of uncovering a previously undiscovered bug. Give distinct test cases that you hope will uncover different bugs. You do not need to list all the output; you may describe it. You may not use the test cases given here or in the problem description.