Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement this code in the (c++ program only) which accepts simple entries such as name, and phone number, and stores the address book entries in

Implement this code in the (c++ program only) which accepts simple entries such as name, and phone number, and stores the address book entries in a form of a Binary tree by inserting the entries, you will have to modify the current implementation to accept strings. Then adjust the entries and save the new info in the table and eventually in the file. Upon exit: Save tree info (will be already sorted) in the phonebook file. Upon startup, load the stored phone info from the phonebook file. Then display phone numbers info in sorted order, limit the entries to a few

Here is BinaryTree.h:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Here is IntBinaryTree.h

image text in transcribed

Here is InBinaryTree.cpp:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Here is the main.cpp:

image text in transcribed

// The displaypreOrder member function displays the values // in the subtree pointed to by nodePtr, via preorder traversal. template // // The displaypostorder member function displays the values // in the subtree pointed to by nodePtr, via postorder traversal.* / / / template Gvoid BinaryTreesTy: :displayPostOrder(Treekode* nodePtr) const { if (nodeptr) \{ displayPostorder(nodePtr->left); displayPostorder(nodePtr->right); cout value endl; j [? \#endif

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: 3

blur-text-image

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

=+ How well do you think you could do your job?

Answered: 1 week ago