Question
[Java Help] Implement a FIFO Queue with GUI interface and test it storing String objects. Queue class as outlined below: class Queue { private Object
[Java Help] Implement a FIFO Queue with GUI interface and test it storing String objects. Queue class as outlined below:
class Queue {
private Object data[]; // queue holds an array of Objects
private int in, out, size;
Queue(int c){ } // constructor, parameter is queue capacity
public void insert(Object n){ }
public Object remove(){ }
public Object peek(){ } // return next item to come out without removing it
public int getSize(){ }
public int getCapacity(){ }
}
Test the Queue class using a JApplet GUI with buttons to perform the basic queue operations like insert, remove etc. Store String objects in the queue.
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