Question: Can someone help me with part of this JAVA program. public class HuffTree implements Comparable { private HuffNode root; /** * Create a default binary
Can someone help me with part of this JAVA program.
public class HuffTree implements Comparable
{
private HuffNode root;
/**
* Create a default binary tree
*/
public HuffTree()
{
root = null;
}
/**
* Create a tree with two subtrees
*/
public HuffTree (HuffTree t1, HuffTree t2)
{
//Add code
}
/**
* Create a tree containing a leaf node
*/
public HuffTree (HuffElement element)
{
// add code
}
/**
* Returns the root of the tree
*/
public HuffNode getRoot()
{
// add code
return root;
}
/**
* Compare the roots of the HuffTrees
*/
@Override
public int compareTo (HuffTree ht)
{
// add code
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
