Answered You can hire a professional tutor to get the answer.

QUESTION

Hi, Could you help me to do some debugging job for my simply Single Linked List in JAVA?

Hi, Could you help me to do some debugging job for my simply Single Linked List in JAVA? The following code could pass my own test but its not able to pass prof's (I have spend about 10 hours on this error. And almost give up. )

We have to upload it to the server so that it could check if there is any error. (Test cases are not provided by prof.)

The requirement is

Exercise 3.3 and 3.4 in the textbookSLListget(i)set(i,x)add(i,x)remove(i)OiOn

It keep showing me the error of NullPointerException.

Testing Question 2Executing: javac ListTest.javaRunning: java ListTest 20Correctness testing for SLList...Exception in thread "main" java.lang.NullPointerException        at ListTest.listsRunoff(ListTest.java:96)        at ListTest.main(ListTest.java:114)Program exited with non-zero status, test failed

My code below:

comp2402a2; java.util.AbstractList; java.util.Iterator; java.util.Queue; java.util.NoSuchElementException;/** * An implementation of a FIFO Queue as a singly-linked list. This also includes * the stack operations push and pop, which operate on the head of the queue *  * morin * * <T> the class of objects stored in the queue */ <> <> <> {
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question