(8 points)
(8 points)
public class Tree {
public Object data;
public int height, depth;
public Tree left, middle, right;
}
Program the following methods for "trinary" tree:
public static void setHeights(Tree root): sets the height-field of every node in the tree
(8 points)