C Using Following Code Modify Completing Following Objectives Finish Implementation E See Q37175507

c++) using the following code modify by completing the followingobjectives to finish the implementation.(I.e. see recursive heightis there, just the implementation of else statement needs to befinished and so on for most of the obj).

in Binary_tree.h

  1. Implement operator=() by using pointer swapping technique.
  2. Implement the following member functions by usingrecursion
  • ~Binary_tree():
  • recursive_preorder()
  • recursive_inorder()
  • recursive_postorder()
  • recursive_height()
  • Add the following public member function

int getLeafCount()

in Search_tree.h

  1. Implement search_and_insert()
  2. Implement search_and_delete() with immediate predecessorapproach

//Binary_node.h

enum Balance_factor { left_higher, equal_height, right_higher};

template
struct Binary_node{
// data members:
Entry data;
Binary_node *left;
Binary_node *right;
// constructors:
Binary_node();
Binary_node(const Entry &x);

};

template
Binary_node::Binary_node(){
left = NULL;
right = NULL;
}

template
Binary_node::Binary_node(const Entry &x){
data = x;
left = NULL;
right = NULL;
}

——————————

//Binary_tree.h

template
class Binary_tree {
public:
Binary_tree();
bool empty() const;
void preorder(void (*visit)(Entry &));
void inorder(void (*visit)(Entry &));
void postorder(void

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.