Assignment 5
Due: 31 Mar 2008
Note: This project has two parts. The first part is a small individual assignment. The second part is a group project.
Part 1 (20 %)
Educational objectives:
- Primary objectives: Implement a simple self-restructuring binary search tree.
- Secondary objectives: Implement and use templates.
Statement of work: Implement a generic self-restructuring binary search tree class, using a self-restructuring scheme specified below.
Deliverables:
- Turn in a
makefile
and all header (*.h) and cpp (*.cpp) files that are needed to build your software, as described in www.cs.fsu.edu/~asriniva/courses/DS08/HWinstructions.html. Turn in your development log too, which should be a plain ASCII text file calledLOG.txt
in your project directory.Requirements:
- Create a subdirectory called
proj5
.- You will need to have a
makefile
in this directory. In addition, all the header and cpp files needed to build your software must be present here, as well as theLOG.txt
file.- You should create the following additional files.
- MDBST.h: This should implement a generic
MDBST
class. This class is a self-restructuring binary search tree. It restructures by rotating a node with its left child, if the node is found by thesearch
operation, and if a left child exists. You should implement at least the following features: (i)void push(const T &)
, (ii)bool search(const T &)
, (iii)void PrintPreorder()
, (iv) a default constructor without arguments, and (v) a destructor. Thepush
function inserts a node into the tree. Thesearch function
returnstrue
if and only if its argument is present in the tree, and also causes a restructuring operation to be performed. ThePrintPreorder
function prints the values stored in each node, using a pre-order traversal.- test.cpp: This is a code that you write to check whether your tree works correctly.
Note:
- We will test your
MDBST
class with code that is different from yourtest.cpp
. So it is important for this class to be generic and exactly as specified.Part 2 (80 %)
Educational objectives:
- Primary objectives: Experience working in a group, and using knowledge of data structures and other concepts learned in this class to code some practical application.
- Secondary objectives: Developing a good user interface.
Statement of work: (i) Implement a software that uses significant data structures and concepts learned in this class. You are free to choose the application on which you wish to work, but please obtain feedback from me before you start your work.
Deliverables:
- Mar 18, 5:15 pm: Turn in a hardcopy of a document, describing your application. Also, mention the data structures and other concepts learned in this class which you will use in this project. I strongly suggest that you obtain feedback from me before turning in this document. Your document will be graded for both content and presentation.
- Mar 21, 5:00 pm: Turn in a hardcopy of a document describing your user interface, and also provide pictures of it in your document. Also mention each class that will be needed in your project, and mention who will implement each of them. Give a deadline for completing the implementation of each class. Your document will be graded for both content and presentation.
- Mar 25, 5:15 pm: Give a hardcopy of the document describing the progress made with the code. Mention the contribution of each member of the group. By this time, you should have implemented code skeletons for all your classes, integrated all your codes at least once, and compiled them to make sure that they will work correctly together.
- Mar 31, midnight: Submit a tar file named
Group
N.tar
, where N is your group number. This tar file should contain the code for your application, along with a README file containing instructions on running your code.- TBA: Group demonstration of your project. You will demonstrate your software, and also explain questions on the code. Each of you must be able to identify significant portions of the code that you wrote, and answer questions on them.
Note:
If you wish to implement nice user interfaces, then some of you may prefer to write code that runs on Windows or Mac machines. In this case, you can bring a laptop on which your code runs in order to demonstrate your software.
Last modified: 5 Mar 2008