vset.h:Header file for this version of the set class. You don't have to write much of this file. Just copy our version from
vset.hand add your name and other information at the top. You may also add more private member functions if you like. Notice that the set is NOT a template class. It is easier to debug with the Item type fixed as an int.
vset.cxx:The implementation file for the new set class. You will write this yourself, including all the private member functions described in Section 11.2. Note: I changed the insert and erase functions a little. They return a bool value now. Read the meaning of these values in the header file.
If you have any private helper functions, you must put a precondition/postcondition contract with each private function's implementation. NOTE: Some of you have been forgetting to put your name and a clearly written invariant at the top of this file. The TAs will start taking off points for such omissions.
makefile:This is a makefile for the assignment. The file should contain targets for vset.o, vsetexam.o, and vsetexam (an executable file). The source code for vsetexam.cxx is available in the locations listed below. Your makefile should also include "all" and "clean" options.
vsetexam.cxx:A non-interactive test program that will be used to grade the correctness of your vset class. This will provide 75 of the 100 points on Homework 11.
Your Set class for this assignment will use a B-tree as described in Section 11.2. You may use a typedef statement defining the Item type as an int number (rather than implementing a template class).
For easier debugging, carry out this assignment in two parts. Part A should include everything except the public remove member function and any private functions that are needed for removal. Once Part A (Homework 10) is working and tested, you may complete the assignment (Homework 11) by implementing the remove member function and its associated private functions.
Use your own interactive test program and the debugger to track down errors in your implementation. If you like, you may share an interactive test program with another student, but do not look at another student's b-tree. If you have an error, do not start making changes until you have identified the cause of the error. If you come to me or a TA for help, we will always ask you to do the following:
Michael will implement this assignment between Nov 17 and Nov 24. He will write a blog of his progress and post that blog here each day! Follow along for a fun learning experience!