Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions