A. J. Burdee, president of Indiana Imports and Exports, has not been satisfied with Ralph and Wanda's work lately. They have not been able to complete their tasks on time. Also, because of the processing approach the secretaries used, some tasks have remained in the "things-to-do" pile for more than a week. To remedy the * situation, Burdee has decided to make two changes at the office. First, he hired another secretary, Pat, and, second, he changed the way the secretaries deal with tasks.
The boss now insists that the secretaries perform the tasks in the same order in which they are placed in the "things-to-do" pile. Thus, when a secretary takes a task from the pile, he or she takes it off the bottom of the pile. The reactions of the secretaries is mixed: Pat is thrilled to get the job; Wanda and Ralph resent the interference of the boss.
As with the old system, when a secretary has tasks in the "things-to-do" pile, he or she starts another task as soon as the current task is finished. If there is nothing in the pile when a task is finished, the secretary reads a magazine for a while. The boss still comes in occasionally to check on the progress of the secretaries.
Write a program to simulate the actions of the three secretaries in doing a day's work by using three queues. The day's events are containedin file 310SECY3.COMPSCI. The event records are in the same form as for Assignment 3: Event code in column 1, secretary name in columns 2-6, and task name in columns 8-37. The event codes are "A" to add a task to the top of the "things-to-do" pile, "B" to start the task taken from the bottom of the pile, "E" to finish the current task and start another (if one is available) and "S" to provide a status report for a secretary. The report should list the secretary's current task and the ones in his or her "things-to-do" pile from bottom to top.
Requirements:
1. The "things-to-do" piles must be simulated using linked list queues.
2. The three queues must use nodes from a common pool of 20 nodes. No more are allowed.