Question: Really need this program to have the headers with them and this is all C++. Write a function that inserts the nodes of a binary

Really need this program to have the headers with them and this is all C++.

Write a function that inserts the nodes of a binary tree into an ordered linked list. Also write a program to test your function.

Do not change anything in the supplied Ch19_Ex9.cpp except to add documentation and your name.

Please use the file names listed below since your file will have the following components: Ch19_Ex9.cpp shown below

//Data //68 43 10 56 77 82 61 82 33 56 72 66 99 88 12 6 7 21 -999

#include #include "binarySearchTree.h" #include "orderedLinkedList.h"

using namespace std; int main() { bSearchTreeType treeRoot; orderedLinkedList newList; int num;

cout << "Enter numbers ending with -999" << endl; cin >> num;

while (num != -999) { treeRoot.insert(num); cin >> num; }

cout << endl << "Tree nodes in inorder: "; treeRoot.inorderTraversal(); cout << endl; cout << "Tree Height: " << treeRoot.treeHeight() << endl; treeRoot.createList(newList);

cout << "newList: "; newList.print(); cout << endl; system("pause");

return 0; } binarySearchTree.h binaryTree.h linkedList.h orderedLinkedList.h

Really need this program to have the headers with them and this is all C++.

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!