title: How to write a method taking argument BinaryTree<float> that uses preorder traversal to calculate X?
body: <p>I can't for the life of me figure this out and was really someone could help me please, it's for revision purposes for an upcoming exam in Java:</p>
  
  <p>•   The following interface specifies the binary tree type. </p>
  
  <pre><code>interface BinaryTree 
  { 
     boolean isEmpty(); 
     T rootValue(); 
     BinaryTree leftChild(); 
     BinaryTree rightChild(); 
  } 
  </code></pre>
  
  <p>Write a method that takes an argument of type BinaryTree [revise different argument types, character etc…(charcter and float are main ones, do rest if time)] and uses a [revise in-order and reorder] preorder traversal to calculate the sum of all of the numbers in the tree specified in the argument and return this sum as a value of type float.</p>
  
  <p>Thanks in advance</p>