Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java Question Implement StackInterface using a deque as the underlying data stru

ID: 3690725 • Letter: J

Question

Java Question

Implement StackInterface using a deque as the underlying data structure.

The class header is: public class Stack<T> implements StackInterface<T>

The instance data is: private DequeInterface<T> deque;

In this question, you will invoke methods on the deque object to implements the methods of the StackInterface.

In addition to implementing all of the StackInterface methods, you will need a constructor. You can use the provided LinkedDeque class to instantiate the deque object.

Review the example from the lecture video for more information about implementing one data type using another data type as the underlying structure.

I did not include test cases in the provided driver file. I recommend you writing your own test cases to make sure that your stack works as it should!

Explanation / Answer

DequeTest.java:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote