#Sales Offer!| Get upto 25% Off:

Create generic LinkedList and Node classes that implement the List interface(https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/List.html).

There is no specification regarding the design of the linked list, however it must function similar to those demonstrated in lectures. Null values are permitted within the list.

The majority of methods are unit tested individually, however the following methods will be used in the testing of others:

  • add(E e)
  • get(int index)
  • size()
  • clear()

The following methods will not be tested (and can return dummy values):

  • hashcode()
  • listIterator()
  • listIterator(int index)
  • E[] toArray(E[] a)

The list should be able to be constructed like so:

List myList = new LinkedList(); Notes

For the final toArray(E[] a) method, use the following code:

JAVA1public X[] toArray(X[] a) {2 return null;3}

Because equals(Object o) takes in an Object and not a List, create a new method public boolean equalsList(List o) that has the same functionality as specified for equals(Object o) in the javadoc. (Note that to test this method, LinkedList list = new LinkedList(); will be used, otherwise the new method will not be recognised)

You are only allow to import the following packages:

JAVA1import java.util.List;2import java.util.Iterator;3import java.lang.Iterable;4import java.util.Collection;5import java.util.ListIterator;6import java.util.NoSuchElementException;

Your program must compile without any warning messages from the compiler. Failure to do so will result in mark deductions.

You cannot use the instanceof keyword in your code.

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!