Question: in java eclipse Purpose The purpose of this assignment is to assist you to learn a binary search tree and tree data structure. Skills The

in java eclipse
Purpose
The purpose of this assignment is to assist you to learn a binary search tree and tree data structure.
Skills
The purpose of this assignment is to help you practice the following skills that are essential to your success in this course / in school / in this field / in professional life beyond school:
- Traverse/display elements in a binary tree (in-order, pre-order, post-order, breadth-first traversal)
- Implement Huffman coding for compressing data using a binary tree
Knowledge
This assignment will also help you to become familiar with the following important content knowledge in this discipline:
- Tree data structure
- Tree in-order, pre-order, and post-order
- Breadth-First Search
- Depth-First Search
Tasks
1. Define a new class named BSTWithNumberOfLeaves that extends BST with the following methods: public int getNumberOfLeaves()
2. Define a new class named BSTWithNumberOfNonLeaves that extends BST with the following methods: public int getNumberOfNonLeaves()
3. Implement the clone and equals methods in the BST class. Two BST trees are equal if they contain the same elements. The clone method returns an identical copy of a BST.
4. Define a new class named BSTWithBFT that extends BST with the following method: public void breadthFirstTraversal()
5. Redefine TreeNode by adding a reference to a node's parent. Reimplement the insert and delete methods in the BST class to update the parent for each node in the tree. Also, add the following new method in BST:
1. private TreeNode \(\mathrm{E}>\) getNode(E element)
2. private boolean isLeaf(E element)
3. private ArrayList get Path(E e)
Submission Format
- source code and sample run
in java eclipse Purpose The purpose of this

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 Programming Questions!