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:

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 16PE: The implementation of a queue in an array, as given in this chapter, uses the variable count to...
icon
Related questions
Question

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:

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Operations of Linked List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning