Question: Solve for 1. Make sure to split the implementation of all your classes between a header and a code file. Implement a simple string set
Solve for 1.
Make sure to split the implementation of all your classes between a header and a code file.

Implement a simple string set calculator in C++11 or subsequent version. The calculator implements sets of strings as binary search trees (BSTs) while exposing a command line interface. The calculator maintain two sets of strings at any point in time named S1 and S2. The calculator supports common set operations by responding to commands listed below. You must comply with the implementation requirements listed below for full credit. Recall that BSTs are binary trees subject to three conditions. First, a string value is associated with each tree node. Second, each node can have at most two children, a left child and a right child. Third, given a node x, the values of all nodes in the left subtree of x are less than the value of x, and the values of all nodes in the right subtree of x are greater than the value of x. Use lexicographical ordering to compare strings. (You are encouraged to use the ASCII code of each string character to determine the value of that character.) No duplicate values will be allowed in your sets. Implementation requirements. You are required to comply with the following guidelines when implementing your string set calculator. 1. Define your own String class for strings contained in the BSTs. The class should have only two data members size- and chars_- of type int and char* respectively. The class should implement, among other member functions, a copy constructor-performing a deep copy-and a destructor to avoid memory leaks. Other members functions should be defined as needed, possibly including an assignment operator consistent with the copy constructor and the destructor. Implement a simple string set calculator in C++11 or subsequent version. The calculator implements sets of strings as binary search trees (BSTs) while exposing a command line interface. The calculator maintain two sets of strings at any point in time named S1 and S2. The calculator supports common set operations by responding to commands listed below. You must comply with the implementation requirements listed below for full credit. Recall that BSTs are binary trees subject to three conditions. First, a string value is associated with each tree node. Second, each node can have at most two children, a left child and a right child. Third, given a node x, the values of all nodes in the left subtree of x are less than the value of x, and the values of all nodes in the right subtree of x are greater than the value of x. Use lexicographical ordering to compare strings. (You are encouraged to use the ASCII code of each string character to determine the value of that character.) No duplicate values will be allowed in your sets. Implementation requirements. You are required to comply with the following guidelines when implementing your string set calculator. 1. Define your own String class for strings contained in the BSTs. The class should have only two data members size- and chars_- of type int and char* respectively. The class should implement, among other member functions, a copy constructor-performing a deep copy-and a destructor to avoid memory leaks. Other members functions should be defined as needed, possibly including an assignment operator consistent with the copy constructor and the destructor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
