Question: java - Add methods to class BSTree: public void PreOder() private void PreOrder (Node R) Traverses and prints the contents of the tree pre-order according



java
- Add methods to class BSTree: public void PreOder() private void PreOrder (Node R) Traverses and prints the contents of the tree pre-order according to the ID. public void Postoder () private void Postorder (Node R) Traverses and prints the contents of the tree post-order according to the ID. public int height() private int height (Node R) Returns the height of the tree. public int countLeaf Nodes () private int countLeaf Nodes (Node R) Returns the number of leaf nodes in the tree. Vrite the expected time and space complexity as a comment at the eginning of each method of your class. . Modify the test application form lab 6 to do the following: The program can perform the following: 1- Insert Students 2- Remove a Student 3- Check if a Student Exists 4- Print InOrder 5- Print PreOrder 6- Print Postorder 7- Height 8- Number of leaf nodes 9- Exit Please enter your selection: The program will perform the action selected by the user and display a proper message when necessary. Please, choose a number from the following list: 1- Insert Students 2- Remove a Student 3- Check if a Student Exists 4- Print InOrder 5- Print PreOrder 6- Print Postorder 7- Height 8- Number of leaf nodes 9- Exit Your choice is: 8 The number of leaf nodes is: 4 Please, choose a number from the following list: 1- Insert Students 2- Remove a Student 3- Check if a Student Exists 4- Print InOrder 5- Print PreOrder 6- Print Postorder 7- Height 8- Number of leaf nodes 9- Exit Your choice is: 9 Exiting!... Add the necessary methods to find and return the highest GPA in the BST. Add the necessary methods to count and return the number of students whose GPA is greater than 2.67
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
