CSC 101 Programming Assignment 5
Turnin Details
As explained in the original writeup, the deliverables for this assignment are the following:
Deliverables a-c should be stored in one file named program5.cpp and turned in electronically as the assignment named program5. Deliverables d and e are turned in on paper to the drop box outside the CSC department office.
Recall from Notes Week 5 that the boxes in a high-level design diagram represent subprograms, described in descriptive English phrases. An example is the high-level design diagram given in the program 4 writeup. Generally, the high-level design has fewer subprograms than there will be concrete functions in the final program. Also, the high-level design diagram need not include the input/output annotations. The point is that the high-level design is a preliminary breakdown of a program into its subprograms.
The strategy for the testing functions is to supply enough inputs to the function being tested to ensure that the function operates properly. To facilitate inspection of function results, the testing function must output the results in a readable format, that can be readily inspected for validity. For example, the function that tests the deck shuffling function must dump the deck after each call to the shuffler. Further, the deck must be dumped in a format so you can ensure that the shuffle is correct. Specifically, the shuffle must randomize the cards, must not drop any cards, and must not add or duplicate any cards.
There are two sample card-related testing functions in the file
classes/101/lectures/examples/card-read-tests.cpp
Note the that these testing functions call their processing functions 60 times
each, since what is being tested involves individual card processing. Your
shuffling, dealing, and instruction paging functions will not have to be called
this many times for adequate testing. Part of your job in this assignment is
to determine what constitutes adequate testing. We will address this topic
further in upcoming lectures.