Question: Lab Practice Lab Task: Use the below code and fill it where appropriate to prompt the user to insert numbers into tree, display tree nodes,
Lab Practice









Lab Task:
Use the below code and fill it where appropriate to prompt the user to insert numbers into tree, display tree nodes, search the tree nodes for a number, and to delete a node from tree. The program must show this message when it starts:
Enter first letter of show, insert, find, delete, or traverse:
Note: traverse has three types.
*please write it by computer typing so it will be easy to copy it.

![print ( iData); System.out.print(", "); System.out.print(dData) System.out.print("] "); /I end class Node](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f534a6674b4_83066f534a611c41.jpg)

the original document : https://drive.google.com/file/d/1J_rxQbWn1sKsiHhRQvC6mvAkFfmD71DF/view?usp=sharing
class Node public int iData; public double dData; public Node leftchild; public Node rightchild // data item (key) // data item /I this node's left child // this node's right child ic void displayNode) 1I display System.out.print'); System-out. print ( iData); System.out.print(", "); System.out.print(dData) System.out.print("] "); /I end class Node import java io. import java.util.*; class Tree private Node root; /I first node of tree public Tree) /I constructor // no nodes in tree yet root null; public Node find(int key) // find node with given key /I (assumes non-empty tree) class Node public int iData; public double dData; public Node leftchild; public Node rightchild // data item (key) // data item /I this node's left child // this node's right child ic void displayNode) 1I display System.out.print'); System-out. print ( iData); System.out.print(", "); System.out.print(dData) System.out.print("] "); /I end class Node import java io. import java.util.*; class Tree private Node root; /I first node of tree public Tree) /I constructor // no nodes in tree yet root null; public Node find(int key) // find node with given key /I (assumes non-empty tree)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
