n java : you need to start implementing a class for creating and storing Binary Search Trees (BST). Each node of this BST will store the roll number, name and CGPA of a student. The class definitions will look like: class StudentBST; class StudentNode { friend class StudentBST; private: int rollNo; string name; Student’s CGPA StudentNode* left; // Pointer to the left subtree of a node StudentNode* right; // Pointer to the right subtree of a node }; class StudentBST { private: StudentNode* root; // Pointer to the root node of the tree public: StudentBST(); // Default constructor }; Write a menu-based driver function to illustrate the working of different functions of the StudentBST class. The menu should look like: 1. Insert a new student 2. Search for a student 3. See the list of students 4. Quit Enter your choice:
in java : you need to start implementing a class for creating and storing Binary Search
Trees (BST). Each node of this BST will store the roll number, name and CGPA of a student.
The class definitions will look like:
class StudentBST;
class StudentNode {
friend class StudentBST;
private:
int rollNo;
string name;
Student’s CGPA
StudentNode* left; // Pointer to the left subtree of a node
StudentNode* right; // Pointer to the right subtree of a node
};
class StudentBST {
private:
StudentNode* root; // Pointer to the root node of the tree
public:
StudentBST(); // Default constructor
};
Write a menu-based driver function to illustrate the working of different functions of the
StudentBST class. The menu should look like:
1. Insert a new student
2. Search for a student
3. See the list of students
4. Quit
Enter your choice:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps