Question
JAVA Program: Ticket Counter using Queue data structure Write a program that will simulate a group of customers queuing at a ticket counter. Your program
JAVA Program: Ticket Counter using Queue data structure
Write a program that will simulate a group of customers queuing at a ticket counter. Your program should be able to read the time arrived for each customer. Perform the operations of insert customer, remove customer, display the queue size and peek the time of the front queue.
What you have to complete: 1. Create 2 different classes: Queue class, Application class. 2. Class Queue: contains the behaviors of a queue. 3. Class application: Performed all the operations in a repeated manner until user chooses option to exit (use while). Allow user to make option (use select-case).
*The methods in the Queue class will be :
-insert() // put item at rear of queue -remove() // take item from front of queue -peekFront() // peek at front of queue -size() // number of items in queue
*It needs to be implemented by using Array
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