public class AVLTree<E>
extends BinarySearchTree<E>
TODO: REPLACE this comment with your own as appropriate.
AVLTree must be a subclass of BinarySearchTree and must use
inheritance and calls to superclass methods to avoid unnecessary
duplication or copying of functionality.
1. Create a subclass of BSTNode, perhaps named AVLNode.
2. Override incCount method such that it creates AVLNode instances
instead of BSTNode instances.
3. Do NOT "replace" the children array in BSTNode with a new
children array or left and right fields in AVLNode. This will
instead mask the super-class fields (i.e., the resulting node
would actually have multiple copies of the node fields, with
code accessing one pair or the other depending on the type of
the references used to access the instance). Such masking will
lead to highly perplexing and erroneous behavior. Instead,
continue using the existing BSTNode children array.
4. Cast children array to AVLNode whenever necessary in your
AVLTree. This will result a lot of casts, so we recommend you make
private methods that encapulate those casts.
5. Do NOT override the toString method of DataCounter. It is used for grading.