Question: 11. Task 1: Write a Java program to implement a Priority Queue in an office i. Provide the menu as shown below. Run the program
11. Task 1: Write a Java program to implement a Priority Queue in an office i. Provide the menu as shown below. Run the program in a loop, stop when user opts 4. Use your own singly linked list of nodes with info request IN and priority. Add a customer should input priority (0 to 10) from user and enqueue it at proper position in the priority queue Remove a customer should dequeue a customer with highest priority. Show the queue should display the queue using the method printoueue. IV V. Priority Queue Priority Queue Priority Queue Priority Queue Priority Queue 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit 1. Add a customer 2 Remove a customer 3. Show the queue 4. Exit 1. Add a customer 2. Remove a customer 3. Show the queue 4. Exit Your choice? 1 Your choice? 2 Your choice? 1 Your choice? 3 Enterpristy27 Added customer1 Your choice? 1 Enterpriority29 Added customer #2 Que 2 (9), 17), 3(1) Removed customer #209) Qurue-17), 3(1) Enterponit 1 Added customer #3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
