CSC 101 Programming Assignment, Turnin Details

CSC 101 Programming Assignment 5
Turnin Details


As explained in the original writeup, the deliverables for this assignment are the following:
  1. Four card processing functions, that shuffle a deck, deal two hands, compare cards, and page out game instructions. These functions must be declared, defined, and properly commented.
  2. Four testing functions, one for each processing function. Each testing function calls its processing function a number of times with different sample inputs, to ensure that the processing function operates correctly.
  3. One main function, that calls the testing functions.
  4. Your choice of card games and a general description of the program's playing strategy, in one typewritten page or less.
  5. A high-level design for the program that will play your chosen game, in the form of a high-level design diagram.

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.



index | lectures | labs | handouts | assignments | solutions | grades | help