Question
import java.util.Queue; import java.util.NoSuchElementException; //Class for a simple queue based on SimpleList //The front of the queue should be the front of //the list. //READ
import java.util.Queue; import java.util.NoSuchElementException;
//Class for a simple queue based on SimpleList //The "front" of the queue should be the front of //the list.
//READ THE DOCUMENTATION for the Queue interface for more information //on how these methods should work and when exceptions should //be thrown. This data structure does not allow adding null.
//DO NOT re-implement nodes in this class... remember how //inheritance works in Java and make use of that! class SimpleQueue
public T remove() { //O(1) return null; }
public T poll() { //O(1) return null; } public T element() { //O(1) return null; } public T peek() { //O(1) return null; } //------------------------------------------------------------- // Main Method For Your Testing -- Edit all you want //------------------------------------------------------------- public static void main(String[] args){ SimpleQueue
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