Assignment 9 - COP 3530, Fall 2007
Please read the assignment submission rules and the academic dishonesty page before you start work on this assignment. Failure to comply by these rules will cost a significant percentage of your assignment grade.
Make sure your classes are in the package dataStructures. If you do not understand
what packages are you can read this
tutorial. If you have trouble with the classpath settings you
could try reading this
tutorial.
Unless stated otherwise, you are not allowed to use any classes from the dataStructures
or the java.util packages.
For any coding question below, even in cases where you may not use any of the methods
of the class you are extending, you MAY use the constructor of the class to be extended
when you create the constructor of your new class. For example, you may do something
like this:
public ALLExtended (){
super();
}
public ALLExtended( int n ){
super(n);
}
In lec19.ppt, you learnt that we can use a binary tree to store an arithmetic expression. For example, the expression
      C*(A-B)/(G+(-E)-F)can be stored in a binary tree like this:

/
*
C
-
A
B
+
G
-
-
null
E
F
Note that if a non-leaf node does not have a left child or right child, you have to put a "null" there.The template is:
package dataStructures;
|