Please contact only serious turors and with good ratings.
I need this work tomorrow..
If i like your work i’ll give you another assignment due on saturday
There are really 2 problems:
1. Binary tree templated class. Create a binary sort tree templated class that will insert from a file, insert from the keyboard, find, delete and print (3 different options).
2. Write a main to facilitate testing your class.
There will be 3 types of input. The main input will be interactive commands from the screen. You will present a menu that will have the various choices numbered, 1 – insert from a file, 2- insert from the keyboard, 3 – find, 4 – delete, 5 – print inorder, 6 – print preorder, 7 – print postorder, 8 – exit.
For your test main, the data stored in each node will be a character string of at most 20 characters. You should make your tree class templated, so your class will handle any data type for future different mains. The insert from a file should prompt for a file name to open. Then the data is read in and inserted into the tree. Do not assume the tree is always empty when this process is chosen. We may read from more than one file during the execution of this program.
The insert from keyboard will prompt for one data value and then insert it into the tree. Do not assume the tree is not empty (the tree can be empty or not empty when this process is called).
The find and delete will prompt for a value and then search the tree for that value. For a find, you will just report found or not found and print the value (in real life, the data in the node will be an entire record and we will just input a key, so when it is found we would be printing out more than just the key). Of course, the delete will remove the node and leave the tree as a binary sort tree.
The three print functions are self explanatory as well as exit.
Test your program with your main. I will provide a main at a later date for purposes of evaluation.
All the output will be to the screen in response to the commands.
I would suggest you get the insert from a file and the print functions working first. Get them thoroughly debugged. This will help with implementing the rest.