The List12 interface and several additional methods.

computer science



1. In Project 2 you will implement a doubly-linked list, including an Iterator over

that list. In particular, you will implement the List interface and several

additional methods. Note that you must implement a doubly-linked list -- you

cannot, for instance, instead implement an array-based list.

2. You will implement a List Iterator class in order to traverse your doubly linked


3. You will then create a lot of J Unit tests to check your methods.

4. If you want more of a challenge, there are a few extra credit problems at the


5. I strongly recommend that you read the entire write-up before getting

started, as you will get a general idea of prioritising different parts and

apportioning your time well.

What to submit

Part 1 - Understanding and Testing First

NOTE: For this part only (the tester), you are allowed to discuss and share

ideas about test cases wit​ h your classmates​. ​This is to make the process of

developing tests a little more fun.

In part 2 you’ll be implementing DoublyLinkedList12 but before that, in this part,

you will develop a tester to test the methods that you will implement.

1. First: Understand what DoublyLinkedList12 will do

In order to write a good tester, you need a deep understanding of how the classes

and methods you are testing are supposed to work. So before you start writing

your tester, read part 2 to understand what DoublyLinkedList12 classes are

supposed to do.

2. Tester for DoublyLinkedList12

  • Download the supplied file This is a starter file and it

defines a small number of tests against the Java Collection’s Framework

Linked List class.

  • Compile and run as-is.
  •  Create a set of meaningful tests on the public methods described in part 2
  • which you are responsible for implementing. Notice that tests Java’s built-in​ Linked List class.                                                                                                                                              This is to allow you to have something to test against before you have your DoublyLinkedList12 class implemented.
  • Make sure your tests pass against Java’s Linked List class.
  •  In your REAMED file, briefly describe what each of these tests attempts to validate. This will test against Linked List's.
  •  After you have completed at least some of part 2, and are ready to
test your ​DoublyLinkedList12 class, copy yo ​ Ur and
rename it to be (Don’t forget to redefine the
class from LinkedListTester to DoublyLinkedList12Tester), and modify the
tests to create DoublyLinkedList12Tester objects.
  •  Notice you do not have to change the type of the iterator because your
​ MyListIterator class is-a List Iterator. However, during testing you may have
used the “SQQ” methods to create your list iterator for testing (see below).
Be sure in the final tester that you submit that these methods have been
renamed to the iterator() and list Iterator() methods that are in the List
interface. (this refers to iterators, so come back to this note when you start working on Part 3) 

  •  In the end, you will be graded on how well your tester find errors across a                                                                                                                                                                                                                                       buggy implementation of the linked lists. Please note that we will test your                                                                                                                                                                                                                                     doubly linked list against our own Master Tests and your tester file against our                                                                                                                                                                                                                   implementation of a doubly linked list. Hence to maintain uniformity, you                                                                                                                                                                                                                                        must not change any of the method names/ method signature provided in the starter code.

Related Questions in computer science category