T
traviswinter
Hello everyone, looking at some of the other threads on the group this
should be cake
I'm doing an assignment (programming in Java) which implements a Heap
based Priority Queue. Basically just trying to get it up and running.
The problem exists like this:
ArrayListCompleteBinaryTree implements the interface CompleteBinaryTree
which implements the interface Tree. Tree has a replace method that
does not throw an exception. The replace method in
ArrayListCompleteBinaryTree can throw an exception due to the way it's
implemented. I would change the replace method in Tree but if I do so
another class, HeapPriorityQueue, which has an
ArrayListCompleteBinaryTree object in it's methods must also throw the
exception for the replace method.
Is there any way around this? I'd figure that since
ArrayListCompleteBinaryTree already covers the exception, that
HeapPriorityQueue would already be covered. Am I wrong? Also, I
should mention that the code I'm using is direct out of our courses'
text (as we were told to use) but it is missing certain methods
(replace is actually given) and does not compile right out of the book.
This things due in a couple of days so I'd appreciate any help anyone
could give me. Thanks!
Travis
should be cake
I'm doing an assignment (programming in Java) which implements a Heap
based Priority Queue. Basically just trying to get it up and running.
The problem exists like this:
ArrayListCompleteBinaryTree implements the interface CompleteBinaryTree
which implements the interface Tree. Tree has a replace method that
does not throw an exception. The replace method in
ArrayListCompleteBinaryTree can throw an exception due to the way it's
implemented. I would change the replace method in Tree but if I do so
another class, HeapPriorityQueue, which has an
ArrayListCompleteBinaryTree object in it's methods must also throw the
exception for the replace method.
Is there any way around this? I'd figure that since
ArrayListCompleteBinaryTree already covers the exception, that
HeapPriorityQueue would already be covered. Am I wrong? Also, I
should mention that the code I'm using is direct out of our courses'
text (as we were told to use) but it is missing certain methods
(replace is actually given) and does not compile right out of the book.
This things due in a couple of days so I'd appreciate any help anyone
could give me. Thanks!
Travis