CPSC 170 Post Lab 10: Linked Structures and the Set ADT 

Due Friday Mar 30.

The file LinkedSet.java contains the LinkedSet class from the text. This relies on the LinkedIterator class, (you created in lab) and on the SetADT interface that you used in lab. The LinkedSet class includes implementations for the add, removeRandom, remove, and iterator methods. Fill in code for the remaining methods -- isEmpty, size, contains, toString, addAll, union, intersection, and equals. Skeletons are provided for each with dummy return values so you can compile it to test the methods as you go.

Make the necessary modifications to TestSet.java and Sentences.java to make them work the the Linked Implmentation of the SetADT. Create three data files (similar to words.dat) called subjects.dat, verbs.dat and objects.dat. Include at least 10 lines in each of these files. Modify Sentences.java to read the data from these files using File I/O, instead of input redirection.