Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In c++, Program a binary search tree with Person objects (name, age, height, wei

ID: 3741148 • Letter: I

Question

In c++, Program a binary search tree with Person objects (name, age, height, weight). Implement the following functionality:

Insert: build by alphabetical order of names

Preorder traversal

Inorder traversal

Postorder traversal

Levelorder traversal

Delete: Deleting a value without sending the deleted value back

DeleteBack: Deleting a value and sending it back to the calling function

Minimum

Maximum

Search (search by name)

SearchBack (search by name and return the value back)

Explanation / Answer

#include #include #include #include "binarySearchTree.h" using namespace std; class person{ public: string getName(); void setName(string nm); string getAddress(); void setAddress(string addy); string getPhoneNumber(); void setPhoneNumber(string num);} bool person::operator==(const person& right) const; bool person::operator!=(const person& right) const; bool person::operator=(const person& right) const; ostream& operatorllink); copyTree(copiedTreeRoot->rlink, otherTreeRoot->rlink); } } //end copyTree template void binaryTreeType::inorder(nodeType *p) { if(p != NULL) { inorder(p->llink); coutrlink)); } template int binaryTreeType::max(int x, int y) { if(x >= y) return x; else return y; } #endif
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote