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

1. 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:
1. Insert
2. Remove
3. Peek
4. Check Empty
5. Check Full
6. 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!