CS 113 -- Intro. to C++/Data Structures -- Fall 99 Homework 06 Due Tuesday, December 14, 8pm Submit all solutions to the non-programming assignments and all general documentation for the programming assignments (how to compile it and run it, what is the name of the files, what are the possible restrictions) in a file named answers.doc. Programming Assignments See separate files for solutions (after the late submission date). Your book contains a description of a bag template class using binary search trees. The header file of this class is called bag6.h and is included in the directory of the present assignment. Your task is to implement this class using the book's directions, in a file called bag6.cpp (even though the extension is .cpp, this should be a template class #included into bag6.h, just like the template classes in your book). You will get progressively more credit depending on which functions you implement. 1 (40) Implement at least the constructors, destructor, insert(), occurrences(), size(). 2 (30) Implement also remove(). 3 (30) Implement all the remaining functions in bag6.h with the possible exception of bag_print(). I recommend you to also implement bag_print(), then you will be be able to inspect the tree in your bag for debugging. What to submit: answers.doc, bag6.cpp You are helped by the following files in this directory: - The files bintree2.h and bintree2.cpp, containing the binary tree toolkit developed in the book. - The file bag6test.cxx provided by your book, containing a testing facility for bag6. You can use it to test your class. - Though the above program may be sufficient to test your class, I also give you tests in the style of assignments 03 and 04 in the subdirectory filetests/. You do not have to use them but I think they provide a more convenient and thorough test than the interactive one. That directory also contains a Makefile showing all the dependencies.