[SOLVED] CSCI1302 - Programming Project 4 - Simple Linked List and Maven

30.00 $

Category:

Description

5/5 - (2 votes)

In this project, you will complete a partial implementation of the SimpleLinkedList<E> generic class

(the partial implementation will be provided) and also implement a suitable JUnit-based test class SimpleLinkedListTest for your completed SimpleLinkedList<E> class.  Furthermore, you will provide the JavaDoc documentation for your SimpleLinkedList class.

You will have to read and fully understand the partial implementation provided to you.

The whole project must be organized using Apache Maven, which is a popular build tool for Java.  I will provide additional explanations in a separate document.

You must compile, test your project using maven commands.  You must also create the JavaDoc documentation using Maven, as well.

 

 

Complete the implementation of SimpleLinkedList and the test class

  1. Create an initial Maven project structure.
  2. Copy the SimpleLinkedList class implementing the SimpleList interface (available on odin in /home/myid/kkochut/cs1302/SimpleLinkedList) into your Maven project and complete the implementation of the following methods in this class (only headers are provided in the provided code):

boolean add(int index, E e)  adds an element e at a specified index position in the list.

IndexOutOfBoundsException exception is thrown if the supplied index is out of bounds, i.e., if  index < 0 or index > size().  If index is equal to size(), the new element is added at the end of the list (it is appended).

E remove(int index)

removes and returns an element at a specified index position in the list.

IndexOutOfBoundsException exception is thrown if the supplied index is out of bounds, i.e., if  index < 0 or index >= size().

int indexOf(E e) returns the index of an element e or -1 if it is not on the list.

The meaning of the above methods should be the same as of the corresponding ones defined by the interface java.util.List<E>.  You must handle the concurrent modification error.  Please, consult the Java SE 8 API documentation, as needed.  You must not use Java’s LinkedList or ArrayList or similar Java classes in your solution.