Question: Write in C++ the following. Program must be made portable (separate .h and .cpp files and please label the files with names so they can

Write in C++ the following. Program must be made portable (separate .h and .cpp files and please label the files with names so they can be compiled right) as binary tree class template will be used again. Show sample output of program working right and comment it so a beginner understands what is going on. See below:

Create a class (BinaryTree) template that will create a binary tree that can hold values of any data type. The class should provide functions to insert a node, a function to delete a node, functions to display the tree In Order, Pre Order and Post Order. It should also provide a member function to search the tree for a value. The class should provide a function that counts the number of nodes in the tree, a function to count the number leaf nodes in the tree, and a function that determines the height of the tree. The height of a tree is the number of levels the tree has. Write a program that shows all these functions work.

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!