Question: Please use java, for eclipse preferably, and thank you in advance for any assistance! 1. Write a code (I.e., Implementing a class) that sorts String

 Please use java, for eclipse preferably, and thank you in advance

Please use java, for eclipse preferably, and thank you in advance for any assistance!

1. Write a code (I.e., Implementing a class) that sorts "String" objects In alphabetic order. You can name it as "StringTree." Each node in the tree should be represented by a "Node" class, which stores the string value and pointers to the right and left child nodes. For any node value in the tree, the value of its left child should come before that value, and the value of its right child should come after that value. The "String Tree" class should contain both a method for adding strings to the tree and a method for printing the tree's value in alphabetic order. Write a test program that receives strings from the user (or reads from a file (attached)) and adds them to the tree. Also, your test program should print out the tree values after each such reception. You may use the class Node shown below. public class Node public String value; public Node left public Node right; public Node(String value) this.value value; this.left null; this.right null

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!