Implement DequeInterface using a list as the underlying data structure. The clas
ID: 3714837 • Letter: I
Question
Implement DequeInterface using a list as the underlying data structure. The class header is:
The instance data variable is:
Invoke methods on the list object to implements the methods of the DequeInterface.
Note that the declared type is ListInterface.
So even though you need to instantiate list as an AList or LList object, you can only invoke methods from ListInterface on the object.
In addition to implementing all of the DequeInterface methods, you will need a constructor.
DeQueue Interface:
public interface DequeInterface<T>
{
public void addToFront(T newEntry);
public void addToBack(T newEntry);
public T removeFront();
public T removeBack();
public T getFront();
public T getBack();
public boolean isEmpty();
public void clear();
} // end DequeInterface
Explanation / Answer
Solution:
DequeTest.java:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.