Question
public interface MyList { public int getSize(); // returns the number of items in the list public void insert(E data) throws ListOverflowException; public E getElement(E
public interface MyList
public int getSize(); // returns the number of items in the list
public void insert(E data) throws ListOverflowException;
public E getElement(E data) throws NoSuchElementException;
public boolean delete(E data); // returns false if the data is not deleted in the list
public int search(E data); // returns index of data, else -1 is return
}
Other than creating the interface shown above, the ListOverflowException class will have to be
created.
NoSuchElementException class is accessed from java.util package.
Create implementation of the above interface in different ways as stipulated below.
Use doubly-linked node to implement the list. Details of the doublylinkednode class are shownbelow.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started