Question: Implement the code below, create a custom queue class arraylist as the storage. Just add one ArrayList as the only private instance variable. After doing

Implement the code below, create a custom queue class arraylist as the storage. Just add one ArrayList as the only private instance variable. After doing this implement a queue and then process queries where 1 x: queue element x into the end, 2: dequeue the element at the front, then 3: print the element at the front. It should prompt for a filename located on a server
________________________________________
public interface IQueue {
boolean add(T value);
boolean offer(T value);
default boolean enqueue(T value){
return offer(value);
}
T remove();
T poll();
default T dequeue(){
return poll();
}
T element();
T front();
default T peek(){
return front();
}
int count();
default boolean isEmpty(){
return count()==0;
}
boolean isFull();
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!