Question: Write a program that reads a file named jobstxt containing job requests that will be stored in two queues. C'Ine queue will store highprioritv jobs

Write a program that reads a file named \"jobstxt\" containing job requests that will be stored in two queues. C'Ine queue will store highprioritv jobs and the ether one will store lowprioritv jobs. The first letter in each line is the code for operation. E: Enqueue [add to back}, D: Dequeue {Remove element from front}, P: Print (Print all elements], 5: Shift {Move the front element to back}. The second letter in each line is the letter for queue. H: HighPrioritv and L: LowPrioritv. For enqueue operation, the third value in the line is the id of the job. For instance, \"E H 12\" should add Job 12 to the end ofthe queue. You need to read each line and perform the requested operation. An example \"jobstxt\" and console output is given below: jobs.txt lI'.Il|ut|:lut 9 25 34 13 19 19 12 13 34 9 15 Note that, different input file {jobs.txt} will be used for evaluation. E H E H E L D H E H E H P H E L E L D L P L S H E L S L E H P L D H P H
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
