Question: c++ Part 3 - Binary Tree program - Do NOT use ' struct ', you must use classes for each tree class. ( 5 points
c++
Part 3 - Binary Tree program - Do NOT use 'struct', you must use classes for each tree class. ( 5 points )
Program 1 Implement/code a Binary tree using an array storing integers. Declare one class, called myBiTree.
// Comment your code well... explaining how each function works
*** Use the following to test....
int main() {
myBiTree T1;
T1.insert(15);
T1.insert(9);
T1.insert(21);
T1.insert(3);
T1.insert(11);
T1.insert(17);
T1.insert(42);
cout << "Preorder: " << T1.preOrderPrintAll();
cout << "Inorder: " << T1.inOrderPrintAll();
cout << "Postorder: " << T1.postOrderPrintAll();
T1.delete(17);
cout << "Preorder: " << T1.preOrderPrintAll();
}
Program 2 - Convert program 1 to a template ( See lecture notes ) ( 5 points )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
