Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA Queues This programming exercise introduces the Queue data structure. The students must create all the necessary methods for the queue and use the

IN JAVA

Queues

This programming exercise introduces the Queue data structure. The students must create all the necessary methods for the queue and use the queue in a Java program. Step 1 - Create a new project in Netbeans Use the following naming convention: Module4_Lastname_Assignment1.

Step 2 - Build a solution You have been asked to create a customer service program for a new phone store that will be opening soon. Since this company anticipates being the agent for a rising new product that will be able to host the most popular video gamesalways released at midnight on the eve of the anticipated announcement datethey want a customer service module that will help them manage the customers as they arrive. Customers will be added to the queue as they arrive, removed once they have been served. Sometimes the queue will be search to determine who is there.

As a prototype for this system, you are to use the linked list created in Assignment 3.1 to create a queue class and a test program that can handle this new system.

The queue class must include a method to insert elements into the queue, remove elements from the queue, look at the first and last element of the queue without removing the elements from the queue, and search for an element in the queue. Use the following algorithm to simulate a simple version of the new system.

Choose a random integer between 1 and 5 to determine the minutes at which a customer arrives. When a customer arrives, choose a random integer between 1 and 5 to determine the number of minutes that the customer must remain in the checkout line.

Repeat the two steps for a 12 hour (720 minute) simulation. Run the simulation again with a random integer of 1 and 3 to compare the number of customers in the checkout line against the original 12 hour simulation.

Step 3 - Compile and execute your code Be sure to test the solution using a set of input data that demonstrates that your solution is correct. Take a screen shot showing the output from your Java program. Step 4 - Submit your assignment When you have completed your assignment submit a copy (source code and screen shot) below. Be sure to include your test data.

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_2

Step: 3

blur-text-image_3

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 Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

What are the key stages of WP/WIP/SWP?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago