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

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