Reference no: EM134027656
Problem
Use a priority queue to simulate prioritized jobs that might be assigned to a worker or group of workers. The jobs have differing level of priority, highest to lowest. This is true of most tasks at a place of employment. Deadlines and urgency among other factors inform the priority of a task. Your supervisor asking for something to be done may be added with highest priority to your priority queue of job tasks that day. When you prioritize working on homework, you may look at the due dates and make your TODO list a priority queue.
Priority Queue
1. Use built-in class in Java for Priority Queue
2. Your Priority Queue will have a 3-digit job number and a priority MM, NN, OO, PP, or QQ
a. ('Job', Priority')
b. (123, PP)
c. (451, QQ)
Driver
1. Create a Priority Queue object using Java Priority Queue
a. What is the data type of the Priority Queue? Get the instant assignment help.
b. How do have each item in the Priority Queue hold a job number and priority?
c. Recall when you write a class, it can be used as a data type
2. Recall The priorities are MM, NN, OO, PP, QQ
3. For each job, randomly generate the job number, ensure it is 3 digits
4. Add 1 job of second highest priority
a. If you are not given the order highest value to lowest, what should you assume?
b. Add a comment about your chosen priority
5. Add 3 jobs of third highest priority
6. Print the Priority Queue
7. Add 2 jobs of highest priority
8. Print the Priority Queue
9. Remove 2 jobs (this will happen by priority)
10. Print the Priority Queue
11. For each call to a method, include a comment above the method call that includes the ADT definition and description of that method
12. At the end of the driver include a natural sounding comment describing the behavior you see in this driver.