HW3 CS210 Due date: Thursday June 28th 11:59pm

advertisement
HW3
CS210
Due date: Thursday June 28th 11:59pm
In previous homework we implemented some of the methods of the SetADT<T>
interface in class ArraySet. The underlying data structure that we used in ArraySet to
implement to SetADT was array. In this assignment we want to implement SetADT
interface using LinkedList data structure and we call the corresponding class
LinkedSet.
That is, LinkedSet implements the SetADT interface using LinkedList data structure.
At this time you should be familiar with the abstract methods of SetADT. Your job in
this assignment is to copy all the java classes for this homework and provide
implementation for all those methods of the SetADT interface that are not
implemented in LinkedSet class. Note that this time, there are more methods to be
implemented.
Important: You need to use the provided LinkedList data structure in LinkedSet
( where each node in the list is of type LinearNode ) to implement the methods. More
specifically you can not create and use any other data structure other than the one
which is provided to you.
I am going to write and post a class for testing the correctness of your LinkedSet
implementation. You need to test your classes against this test class. Please check
the announcement page in next few days for obtaining this test class.
Also, you need to create a text file name memo.txt and explain in this file what is the
running time complexity (Big-O) of each of the methods you have implemented in
LinkedSet class.
We are going to discuss this homework further in class. So, make sure that you
attend the lectures for QA and discussion on this assignment.
Delivery Instructions:
1. Create a directory name hw3 (case sensitive) in your cs210 folder located in
your UNIX home directory.
2. Copy all your java files and the memo.txt in hw3 directory before the specified
due date.
3. There will be 20% of the total grade penalty for each day of submitting your
homework late.
If you want to complete this assignment successfully before the due date I strongly
suggest you to start it as soon as you receive it and work on it everyday.
Download