CS 246 Homework 5Red-Black Trees

You MUST work with one other person on this assignment.

Full Assignment Due:   Monday, April 8, 2013
 
Please read the homework guidelines before you proceed.


Project Description

Implement and unit-test a Red-Black tree object using C++ templates. 


Red-Black Tree Implementation [65pts]

Your Red-Black tree should use proper object-oriented design and be implemented as a C++ templated class so that it can act as a container for any data type.  It should support all standard Red-Black tree operations:
Your implementation should not permit duplicate elements in the red-black tree.

Testing [35pts]

Write two programs to test your red-black tree:

  1.  The first program, called unit_test_rbtree, should run a series of automated tests of the red-black tree, outputting whether or not the red-black tree passed or failed the tests based on the expected result.  It should run multiple tests of all operations of the red black tree, and test the red-black tree as a container for at least two data types.
  1. The second program, called manual_test_rbtree, should be interactive and support the following commands (one per line):

Neither of these test programs should take in any command line arguments.


Write Up

In a separate brief write-up, discuss the following:


Final Program

Submit one assignment for all partners, following the assignment guidelines and submission instructions. 

Be sure to list all partners' names in your README file. 

Provide a working Makefile for your assignment.  The Makefile should support four commands:  make, make unit_test, make manual_test, and make clean.  I must be able to:

  1. Uncompress your submission
  2. "cd" into the directory
  3. Type "make" and have your program compile itself.
  4. Type "make unit_test" and have it output the results of the unit test.
  5. Type "make manual_test" and have it run the manual test program.

Put all source code, the data files, the README, your writeup, and Makefile into a single .tar.gz file.

Additionally, each partner should also submit an independent and private brief statement via e-mail to Eric that describes each partner's contribution to the project.  Use the subject "CS246 HW5 Partner Work Distribution".