Question: Modify Listing 25.8, BSTAnimation.java, to add three new buttonsShow Inorder, Show Preorder, and Show Postorder to display the result in a label, as shown in
Modify Listing 25.8, BSTAnimation.java, to add three new buttons—Show Inorder, Show Preorder, and Show Postorder—
to display the result in a label, as shown in Figure 25.22. You need also to modify Listing 25.4, BST.java to implement the inorderList(), preorderList(), and postorderList() methods so each of these methods returns a List of the node elements in inorder, preorder, and postorder, as follows:
public java.util.List inorderList();
public java.util.List preorderList();
public java.util.List postorderList();

Data from Listing 25.4





Data from Listing 25.8


Exercise25_13 ESTAnimation Inorder: (10, 12, 13, 23, 45, 47, 67) 67 s inserted in the tree 45 12 10 67 13 Enter a key 67 Insert Delete Show Inorder Show Preorder Show Postorder
Step by Step Solution
3.34 Rating (157 Votes )
There are 3 Steps involved in it
import javafxapplicationApplication import javafxgeometryPos import javafxstageStage import javafxsceneScene import javafxscenecontrolButton import javafxscenecontrolLabel import javafxscenecontrolTex... View full answer
Get step-by-step solutions from verified subject matter experts
