Question: I need this program to be made in Java. Below the program requirement is the files to be used with the program. Driver.java /** *
I need this program to be made in Java. Below the program requirement is the files to be used with the program.

Driver.java
/** * DoubleOrderedList testing area. * */ public class Driver { public static void main(String [] args) { DoubleOrderedList list = new DoubleOrderedList(); list.add(23); list.add(24); list.add(16); list.add(3); list.add(7); list.add(17); list.add(9); list.add(13); list.add(14); list.add(1); System.out.println(list); list.remove(7); list.removeFirst(); list.remove(17); list.removeLast(); list.remove(14); list.removeLast(); System.out.println(list); /* Test Results: 1 3 7 9 13 14 16 17 23 24 3 9 13 16 */ } } ElementNotFoundException.java
/** * ElementNotFoundException represents the situation in which a target element * is not present in a collection */ public class ElementNotFoundException extends RuntimeException { /** * Sets up this exception with an appropriate message. */ public ElementNotFoundException (String collection) { super ("The target element is not in this " + collection); } } EmptyCollectionException.java
/** * Represents the situation in which a collection is empty. */ public class EmptyCollectionException extends RuntimeException { /** * Sets up this exception with an appropriate message. * @param collection the name of the collection */ public EmptyCollectionException (String collection) { super ("The " + collection + " is empty."); } } ListADT.java import java.util.Iterator; /** * ListADT defines the interface to a general list collection. Specific * types of lists will extend this interface to complete the * set of necessary operations. */ public interface ListADT extends Iterable { /** * Removes and returns the first element from this list. * * @return the first element from this list */ public T removeFirst(); /** * Removes and returns the last element from this list. * * @return the last element from this list */ public T removeLast(); /** * Removes and returns the specified element from this list. * * @param element the element to be removed from the list */ public T remove(T element); /** * Returns a reference to the first element in this list. * * @return a reference to the first element in this list */ public T first(); /** * Returns a reference to the last element in this list. * * @return a reference to the last element in this list */ public T last(); /** * Returns true if this list contains the specified target element. * * @param target the target that is being sought in the list * @return true if the list contains this element */ public boolean contains(T target); /** * Returns true if this list contains no elements. * * @return true if this list contains no elements */ public boolean isEmpty(); /** * Returns the number of elements in this list. * * @return the integer representation of number of elements in this list */ public int size(); /** * Returns an iterator for the elements in this list. * * @return an iterator over the elements in this list */ public Iterator iterator(); /** * Returns a string representation of this list. * * @return a string representation of this list */ public String toString(); } NonComparableElementException.java
/** * NonComparableElementException represents the situation in which an attempt * is made to add an element that is not comparable to an ordered collection */ public class NonComparableElementException extends RuntimeException { /** * Sets up this exception with an appropriate message. * * @param collection the exception message to deliver */ public NonComparableElementException (String collection) { super ("The " + collection + " requires comparable elements."); } } OrderedListADT.java
/** * OrderedListADT defines the interface to an ordered list collection. Only * Comparable elements are stored, kept in the order determined by * the inherent relationship among the elements. */ public interface OrderedListADT extends ListADT { /** * Adds the specified element to this list at the proper location * * @param element the element to be added to this list */ public void add(T element); } Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
