Question: Implement the BinarySearchTree class. The BinarySearchTree class extends the BinaryTree class. Both can be seen hereLinks to an external site.. Your assignment is to implement
Implement the BinarySearchTree class. The BinarySearchTree class extends
the BinaryTree class. Both can be seen hereLinks to an external site.. Your assignment is to
implement all of the abstract methods of the BinaryTree class recursively. They are:
insert
iterator nonrecursive
remove
search
You must also implement an Iterator inner class for the
BinarySearchTree class. You must submit a modified BinarySearchTree.java
file with your source code. Do not submit and do not modify
the BinaryTree.java or Main.java files.
BinaryTree.java
public abstract class BinaryTree implements Iterable
protected class Node
protected NodeT data
this.data data;
protected T data;
protected Node left;
protected Node right;
public abstract void insertE data;
public abstract void removeE data;
public abstract boolean searchE data;
protected Node root;
BinarySearchTree.java
public class BinarySearchTree extends BinaryTree
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
