[Solved] C Programming Project Practice Template Class Function Pointers Recursion Binary Search Tr Q37289013
C++ PROGRAMMING
In this project, you will practice template class, functionpointers, and recursion with the binary search tree program. Therequirements are as follows.
Binary_tree.h
- Implement operator=() by using pointer swapping technique.
- Implement the following member functions by usingrecursion
- ~Binary_tree():
- recursive_preorder()
- recursive_inorder()
- recursive_postorder()
- recursive_height()
- Add the following public member function
- int getLeafCount()
Search_tree.h
- Implement search_and_insert()
- Implement search_and_delete() with immediate predecessorapproach
main.cpp
- Add menu items for three traversals
- Add a menu item for computing leaf count.
- Create a function named increase withthe following signature and use it as a visit function for threetraversal methods.
void increase(int);
The increase() will increase the value of data of a node by 1,as the function applies to each node.
- Running and testing your program in the following order andtake screenshots for each step.
- Build a binary search tree with the following keys in order:20, 10, 15, 40, 18, 30, 80, 35, 60, 90, 5, 7, 1, print the tree,and print the leaf count and height.
- Delete 30 and print the tree
- Delete 20 and print the tree and leaf count
- Print the result of pre-order traversal after applyingincrease() as a visit function.
- Print the result of in-order traversal after applyingincrease() as a visit function.
- Print the result of post-order traversal after applyingincrease() as a visit function.
Expert Answer
Answer to C++ PROGRAMMING In this project, you will practice template class, function pointers, and recursion with the binary sear… . . .
OR

