Lab 9
Singly Linked List
March 23, 2006
Lab Partners
Everyone should work with one lab partner on this assignment.
Purpose
The purpose of this lab is to give you experience
with singly linked lists.
Code Base
Create a BlueJ project named inlab9 and copy the following
code into it:
Tasks
- 3 points. Modify the add routine in the LinkedList
class so that it maintains the
list in sorted ascending order.
- 2 points. Modify the add routine in the Linked List
so that duplicates are not added to the list.
- 5 points. Modify the remove routine in the LinkedList
class so that it can properly
remove items that are already present in the list (3 points)
and not do anything with items that are not in the list (2 points).
The list should be maintained in sorted ascending order.
What to Submit
E-mail all of the code to your lab TA in one message with
the subject CS221-xx inlab9 your-names.
Before Lab Ends
Delete any BlueJ projects that you created and empty the recycle
bin. Thanks.