CS 1321 (Principles of Algorithm Design II):
Homework #9 Sample Solution

Sample solution code

Not available.

Testing

All of this is somewhat moot given that no one turned in code that would compile. If anyone had, this is how it would have been tested.

Note that both programs to be used for testing use URL.h.

Testing the hashTable class

We would have tested the hashTable class with a test program, Here is the code for the test program:

The test program requires input from standard input. We would have run the program with several different input files:

Here is a directory containing data files corresponding to the "URL"s named in the test input:

And here is the expected output:

Testing the findDuplicates program

We would have tested the findDuplicates program (generated by compiling the provided findDuplicates.cc with your hashTable class) by executing it twice, once with each of the following files as its command-line argument:

Here is the expected output: