Hi guys, thanks for the input. I have taken your suggestions into account, along with recoding portions of my code; but now I get the following errors
Size Before:4
Is the priority queue empty? false
Exception in
thread "main" java.lang.NullPointerException
at PqList.min(PqList.java:56)
at PqList.removeMin(PqList.java:76)
at PqListTest.main(PqListTest.java:16)
My modified code is
test class
I know there is definitely something wrong with my min() function. If all goes well it should return the entry with the minimum key. Furthermore, my removeMin() function should be able to call the min() function assign the minimum entry to another entry; then delete it from my list. However, It is crashing. I really don't understand how to fix this. The linked list should be dynamic ds so the first value added to the list could have a key of 1000 and the list should be able to accomadate it, correct me if I am wrong. Once again any suggestions greatly appreciated.
cheers
mike