a) Create a TreeNode class with the following methods: default constructor, two overloaded constructors, copy constructor, getValue, getLeft, getRight, setValue, setLeft, setRight
b) Create a BTInterface with the following abstract methods: getRoot, setRoot, isEmpty, swapSubtrees, singleParent, preorder, postOrder, inOrder, insert
c) Create an abstract BinaryTree class that implements the interface. Include the default constructor, a private helper method called checkNode for singleParent() and toString. Make insert an abstract method.
d) Derive a BinarySearchTree class from BinaryTree with the following methods: default constructor, overloaded constructor (use a variable length parameter), insert.
e) Create a TreeDemo class that creates two BinarySearchTree objects. Use default and overloaded constructors. For tree one: call the methods makeTree (makes a complete tree), printTree, swapSubtrees, printTree. Similar for tree two. Also, print out the number of single parents in each tree. Define makeTree and printTree in this class.
a) Create a HeapPriorityQueue interface with the following abstract methods: isEmpty, isFull, enqueue, dequeue, reheapifyUpward, reheapifyDownward, reposition.
b) Create the HeapPriorityQueue class. Have heapArray hold maxSize of 250 entries. Also, include the methods: default constructor, toString.
c) Create HeapOverflowException and HeapUnderflowException classes
d) Create a HeapDemo class that creates a HeapPriorityQueue object and insert the values 1-10 into the heap. Print out the heap and remove two values from the heap. Print the resulting heap. Try and show the resulting tree with the nodes on their appropriate levels along with their branches.