Question: 1 . Write a Java program that represents a queue data structure to simulate a queue of customers waiting to a grocery checkout line. Implement
Write a Java program that represents a queue data structure to simulate a queue of customers waiting to a grocery checkout line.
Implement the queue using Java queue interface by linkedlist.
Print menu with numbers and description as follows:
Insert
Remove
Peek
Check Empty
Check Full
Size
Then scan the number insert by the user and apply the function related to the number. Each function
should have print in last line to print out the results.
After that the program should ask user if like continue or not. If Yes is answer, then show again the
above menu and wait for user. Otherwise, if the response from user is No then exit the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
