Project 10 - EE 312 - Binary Search Trees

In this project, you will get practice with:
You may not acquire from any source (e.g., another student or an internet site) a partial or complete solution to a problem or project that has been assigned. You may NOT show other students your solution to an assignment. You may not have another person walk you through how to solve an assignment, or walk another student through the solution. You may get help from the instructional staff. You may discuss general ideas and approaches. Review the class policy on collaboration from the syllabus. I will run plagiarism detection software on project submissions.

Make sure that you follow the EE 312 style guide. You will lose points if you do not. You must include the honor statement below in your .h file. You will lose points if you do not.

Note: Because you are writing a template class, your implementation code MUST go in the BST.h file.

Include the following at the top of your file: 

// EE 312 Project 10 -- Binary Search Tree

/* Student information for project:
 *
 * Replace <NAME> with your name.  <--- REMOVE THIS LINE FROM YOUR HEADER
 *
 * On my honor, <NAME>, this programming project is my own work
 * and I have not provided this code to any other student.
 *
 * Name:
 * email address:
 * UTEID:
 * Section 5 digit ID:
 * No slip days allowed on Project 10
 */

Provided files: BST.h, BSTMain.cpp and test.txt

You are provided with an incomplete header file for a templated BST class. You are also given a simple driver program and a text file. You will need to do additional testing beyond the provided driver.

Do not modify the BST.h file other than adding comments and your member function implementations as indicated.

We will grade this program with a script. Note that the return types for the traversals are vectors, and that the other functions return integer or boolean values. We will test your BST class using our own driver, comparing your returned vectors with the expected results.

Submit your BST.h file on Canvas. You must work alone on this project.


Sample Output:

in order traversal of the int BST:
3
25
50
55
77

inserting word from the input file: This
inserting word from the input file: is
inserting word from the input file: a
inserting word from the input file: series
inserting word from the input file: of
inserting word from the input file: words
inserting word from the input file: to
inserting word from the input file: test
inserting word from the input file: the
inserting word from the input file: tree

inorder traversal of stringBST is:
This
a
is
of
series
test
the
to
tree
words
Min string in stringBST = This
Number of nodes in stringBST: 10

Remove "tree" from stringBST and print inorder traversal:
This
a
is
of
series
test
the
to
words

Number of nodes in stringBST: 9

making deep copy of stringBST...
This
a
is
of
series
test
the
to
words
inorder traversal of stringBST:
a
is
of
series
test
the
to
words
inorder traversal of stringBST2:
This
a
is
of
series
test
the
to
words