Question: Need help completing the methods for an ARRAY LINEAR LIST. below are the constructors (JAVA) HELP, can someone complete the methods below for an ARRAY
Need help completing the methods for an ARRAY LINEAR LIST. below are the constructors (JAVA)

HELP, can someone complete the methods below for an ARRAY LINEAR LIST. (JAVA)
/* Removes and returns the parameter object obj in first position in list if * the list is not empty, null if the list is empty. */ public E removeFirst(); /* Removes and returns the parameter object obj in last position in list if * the list is not empty, null if the list is empty. */ public E removeLast(); /* Removes and returns the parameter object obj from the list if the list * contains it, null otherwise. The ordering of the list is preserved. * The list may contain duplicate elements. This method removes and returns * the first matching element found when traversing the list from first * position. * Note that you may have to shift elements to fill in the slot where the * deleted element was located. */ public E remove(E obj); /* Returns the first element in the list, null if the list is empty. * The list is not modified. */ public E peekFirst(); /* Returns the last element in the list, null if the list is empty. * The list is not modified. */ public E peekLast();
/* Returns true if the parameter object obj is in the list, false otherwise. * The list is not modified. */ public boolean contains(E obj); /* Returns the element matching obj if it is in the list, null otherwise. * In the case of duplicates, this method returns the element closest to front. * The list is not modified. */ public E find(E obj);
/* The list is returned to an empty state. */ public void clear();
/* Returns true if the list is empty, otherwise false */ public boolean isEmpty(); /* Returns true if the list is full, otherwise false */ public boolean isFull();
/* Returns the number of objects currently in the list. */ public int size(); /* Returns an Iterator of the values in the list, presented in * the same order as the underlying order of the list. (front first, rear * last). */ public Iterator
}
maiN OY 7 8 9 10 11 14 1e import java.util.Iterator; 2 import java.util.NoSuchelementException; 3 import java.util.concurrentModificationException; 5 public class ArrayLinearList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
