Question
I need help with this java code: My Code: import java.util.*; public class ListDeque implements IDeque { // this time store the deque in a
I need help with this java code:
My Code:
import java.util.*; public class ListDeque implements IDeque { // this time store the deque in a list // myQ.get(0) is the front of the deque private List
public ListDeque(){}
public void enqueue(Integer x){}
public Integer dequeue() {}
public void inject(Integer x) {}
public Integer removeLast() {}
public int length() {}
public void clear() {}
// complete the class }
Finish implementing the ListDeque class. a. Add a constructor to the class that creates an "empty" deque. The constructor should not have any parameters. b. You will need to add any necessary contracts and Javadoc comments to the constructor. c. Add the methods needed to meet the interface specification d. Do not add any additional methods e. Do not add any additional private data fields f. Add your correspondences and invariants to the class.
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