Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please my professor wants me to rewrite this program again is a different form and it should compile and run without any error and this

please my professor wants me to rewrite this program again is a different form and it should compile and run without any error and this program is correct but he just want me to write it again in a simple form or another way in the same language.so please help me image text in transcribed
what exactly do you need the program already compile and runs but all im asking is that my professor wants me to write it again in a different way but in the same c++ language so you can run it and all i need from an expert like is to write it again in your own wisdom in a different format but the same c++ language that will run without any error. I hope im making sense?
Please I want this program to be rewritten in the most simplest form but accurate and able to compile and run so please help me. #include #include #include using namespace std; #define COUNT 10 struct node { public: string data; node* leftChild; node" rightChild; }; class BST public: node.insert (node, string); void print2Dutil(node, int); void print2D (node); }; node* Newnode(string f){ node"temp = new node; temp ->data=t; temp -> rightChild= NULL; temp -> leftChild=NULL; return temp; } node* BST::insert (node* root, string data){ if (root==NULLX root = Newnode (data); } else if (datadata){ root -> rightChild = insert(root->rightChild, data); } else { root->leftChild = insert(root->leftChild, data); } return root; ) void BST:: print2DUtil(node *root, int space) { if (root == NULL) return; space += COUNT; print2DUtil(root->rightChild, space); coutdataleftChild, space); cout Insert a file" Display the files" >option; switch(option) case 1: cout > element; root = B.insert(root, element); break; case 2: B.print2D(root); while (option!=0); cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Bitmaps maintain their quality after resizing. True False

Answered: 1 week ago

Question

3 The distinction between microeconomics and macroeconomics.

Answered: 1 week ago

Question

2 The role of economic theory in economics.

Answered: 1 week ago