Question: This code should be in Java What to for the OUT-LAB 1. Design and implement a class for the Node class closely related to the

This code should be in Java

This code should be in Java What to for the OUT-LAB 1.

What to for the OUT-LAB 1. Design and implement a class for the Node class closely related to the Node class I did in class, but created for a Tree instead of LinkedList This Node class should be using generics for it's data. . This class will need to have references to both it's children. . And it will need all the elements/methods to set, get those references as well . Plus methods to retrieve the data which will eventually get the String in the Dog Class created in toString() . You should know exactly where to go to find a very useful example to do all this stuff. 2. The data for this tree will be a Comparable class called Dog you created for the inlab this week. 3. Design and implement the TreeMaster class: The add method should be a recursive method based on the pseudocode given in the notes. . This will be similar to the LinkedList example I went over in class. TreeMaster should use Generics. One data member (or attribute) in this class it should be a reference variable to point to the root. No DUMMY variables needed like the linked list example. . You only add in order so there doesn't need to be the additional add methods, just one method to insert Dogs into the tree.. . You will need a remove method which will also be based on the pseudocode algorithm given during class. This class will need three print methods, inorder, preorder, postorder. Use the algorithms in the notes that I covered in class to create these print methods. 4. Update your driver to fill the tree with at least seven dogs and then test your three print statements. 1. Grading Criteria You will be graded in the outlab by the following: Programming style Insertion method working properly In-Order Display Pre-Order Post-Order Delete method Generics . Node and Tree Master should work with any Data class, not just Dogs. Comparing working What to for the OUT-LAB 1. Design and implement a class for the Node class closely related to the Node class I did in class, but created for a Tree instead of LinkedList This Node class should be using generics for it's data. . This class will need to have references to both it's children. . And it will need all the elements/methods to set, get those references as well . Plus methods to retrieve the data which will eventually get the String in the Dog Class created in toString() . You should know exactly where to go to find a very useful example to do all this stuff. 2. The data for this tree will be a Comparable class called Dog you created for the inlab this week. 3. Design and implement the TreeMaster class: The add method should be a recursive method based on the pseudocode given in the notes. . This will be similar to the LinkedList example I went over in class. TreeMaster should use Generics. One data member (or attribute) in this class it should be a reference variable to point to the root. No DUMMY variables needed like the linked list example. . You only add in order so there doesn't need to be the additional add methods, just one method to insert Dogs into the tree.. . You will need a remove method which will also be based on the pseudocode algorithm given during class. This class will need three print methods, inorder, preorder, postorder. Use the algorithms in the notes that I covered in class to create these print methods. 4. Update your driver to fill the tree with at least seven dogs and then test your three print statements. 1. Grading Criteria You will be graded in the outlab by the following: Programming style Insertion method working properly In-Order Display Pre-Order Post-Order Delete method Generics . Node and Tree Master should work with any Data class, not just Dogs. Comparing working

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!