How should I type the implementation file and the main file

How should I type the implementation file and the main file

struct TreeNode {

string word;

TreeNode * left, right;

};

Note: A lot of your work from lab 9 can be reused or repurposed. Remember that working with a partner is encouraged!

Using Classes

Define a Tree class suitable for holding the Node struct defined above.

I have provided a header file and the .obj that accompanies it so you can see how a binary search tree is supposed to function; simply put both files into your project directory (where you’ve gotten your submission file all semester). I did not provide a main; just test your functions until you’re satisfied.

  1. I will provide a main to test your code; it will use all of your relevant functions appropriately if you use the included header file. If you do not use the provided header, you must provide a main file that presents the following menu to the user
    1. Add an item (asks user for item)
    2. Find an item (asks user for item)
    3. Show two stats for our current tree: number of nodes and maximum depth
    4. Display tree after asking user to choose from pre, in, or post order traversal
    5. Destroy the tree
    6. Destroy the tree and exit
  2. Return to step 2 if user did not choose f

I need a class implementation file and a main file that are based on the given header file.

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper