Write a recursive body for the following static, generic method that computes an
ID: 3858856 • Letter: W
Question
Write a recursive body for the following static, generic method that computes and returns the size of a given BinaryTree. You can use any of the BinaryTree methods except for the iterator and the size kernel method. Note that the BinaryTree must be restored, i.e., its outgoing value must be the same as its incoming value. [JAVA]
/**
* Returns the size of the given {@code BinaryTree}.
*
* @param
* the type of the {@code BinaryTree} node labels
* @param t
* the {@code BinaryTree} whose size to return
* @return the size of the given {@code BinaryTree}
* @ensures size = |t|
*/
public static int size(BinaryTree t) {...}