Question: *C++ ONLY please, no c commands/functions, please use only C++ * I will be using visual studios to test the program *Please add all comments

*C++ ONLY please, no c commands/functions, please use only C++

* I will be using visual studios to test the program

*Please add all comments including all functions if possible

**Procedural code if possible/ also as stated no c commands/header/functions only c++ please

write a C++ program that creates a tree for the following string data(stored in an input file sample shown below), where:1) the leftmost string goes into a node;2) the middle string goes into the nodes left child; and,3) the rightmost string goes into the nodes right child.

However, the string null in the middle position means the node has no left child,and the string null in the rightmost position means the node has no right child.The first line contains the root nodes string in the leftmost position, and for everynon-null string, there must be a line with that string in the leftmost position. Usethe following data in the input file:

dog over brown

over red jumped

red The quick

The null null

quick null null

jumped fox null

fox null null

brown the lazy

the null null

lazy null null

*C++ ONLY please, no c commands/functions, please use only C++ * I

Note that the string The is not the same as the string the.It is recommended that you load the tree using preorder searches while reading theinput file. After the tree is loaded your program should print out the result of apostorder traversal with a space between each string and a newline at the end.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!