Assignment Three



This assignment is to add methods to the BinaryTree<T> class to draw binary trees. This will be illustrated by drawing expression trees. The methods that need to be implemented are draw, calculateXs, calculateYs and traceTreePreorder. In BinaryTree<T> I have added the methods and indicated where code is to be added. I will discuss the drawing algorithm in class.

Test your implementation using the ExpressionTree class. This class must also be implemented as part of this assignment. This was to be an exercise but since there will be no fourth assignment it will be part of this assignment. Test your solution with TestAndDrawExpressionTree.java. This assignment is now due via e-mail on Saturday March 18th at 2:00.