Update Tree.java

Just does calculations for the trees nodes