Create a Java interface that declares the following methods:
/** Adds a new entry to the beginning of this list. */public void addFirst(T newEntry)/** Adds a new entry to the end of this list. */public void addLast(T newEntry)/** Removes and returns the first entry in this list. */public T removeFirst()/** Removes and returns the last entry in this list. */public T removeLast()/** Returns the first entry in this list. */public T getFirst()/** Returns the last entry in this list. */public T getLast()/** Moves the first entry in this list to the end of the list. */public void moveToEnd()
Then define DoubleEndedListInterface by extending this interface and ListInterface. Write a class that implements DoubleEndedListInterface. Represent the list’s entries by using a chain of nodes that has both a head reference and a tail reference. Write a program that thoroughly tests your class.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.