Write a static method of the BTNode class to meet the following specification Bt
ID: 3599494 • Letter: W
Question
Write a static method of the BTNode class to meet the following specification
BtNode has instance variables data, left, right
a) public static void increase(BTNode<Integer>root)
precondition: root is the root reference of a binary tree
postcondition: every node of the tree has had its data increased by one
b) public static void int count42(BtNode<Integer>root)
precondition: root is the root reference of a binary tree
postcondition: the return value indicates how many times 42 appears in the tree. If the tree is empty return zero.