Finish "In-lab Exercise" 2 and 3, as well as "Postlab Exercise 2" from the lab exercise defined in the handout, "Singly Linked List Implementation of the List ADT". (You need not complete "Postlab Exercise 1".) For your convenience, the files for completion of the lab are: List.java, (which provides the implementation of the List interface), SLIDES.DAT (used by the SlideShow program), SlideShow.jshl (the .jshl files are skeleton implementations--you have to provide code to make them work), SList.jshl (the singly linked list class), SListNode.jshl (the node class associated with the linked list class) TestSList.java (a program you should use to test your linnked list class.)
In "Step 2", you are told to "activate" the '#' command. If you look at the code TestSList.java, as provided, you'll see several lines preceded by "//#'. Just delete those 3 characters at the beginning of each line and recompile. Java now expects to be able to invoke the insertBefore method on testList. So now you'll have to implement that method in the SList class.
Just follow the directions in the hand out. There is a fair amount to do here, but none of it very complicated. You'll have to add code to the main() method in class SlideShow that reads in the slides and then prints them. You'll have to flesh out methods in the Slide class (so SlideShow can invoke them).
For the slide show, if you want to add pauses between the slides, call the Thread.sleep(x) method, where x is the number of milliseconds you want to pause for. If you look at the SlideShow code, and SLIDES.DAT,you'll see that the data file ("SLIDES.DAT") consists of a sequence of "slide definitions", each preceded by an integer, which is a delay, in seconds, defined for that slide.
Here is a video of my solution running the slide show.
Provide a diagram like those we used in class: manipulations of chains of nodes as "boxes" with links shown as lines, etc.
You should hand in a completed copy of pp. 163, 165, 169, 170 from the handout. When you are asked to "add test cases" to a test plan (such as on pp.160-1) that means that you should have added lines to the Test Plan table, filling in all four columns.
To the drop box, submit a lab document containing a console transcript showing your TestSList correctly completing the Test Case on page 163 of the handout. Submit your working .java files to the drop box. I should be able to run the test cases with my own copy of TestSList, as well as your slide show.