Question: Problem Description An organization provides electronic services to customers through three reception desks ( ` desk 1 ` , ` desk 2 ` , and

Problem Description An organization provides electronic services to customers through three reception desks (`desk1`,`desk2`, and `desk3`). Each customer has a name, age, and service category. The simulation will manage these customers by adding them to reception queues based on priority and availability, and handle service requests that remove them from the queues. The data in the attached file represents a series of customer arrivals and commands to serve customers at specific desks: Part 1: Priority Queue Simulation for Customer Visits (3 Marks): - Read the customer data from a file and parse each entry. - Use three queues (`desk1`,`desk2`,`desk3`) to manage customer arrivals. - Each new customer should be added to the queue with the fewest customers, following priority rules: o **Highest priority** is given to customers above age 60. o Then, prioritize by service category: `cat3`>`cat2`>`cat1`.- For each "serveDesk" command (e.g.,`serveDesk 1`), simulate serving the customer by removing the highest-priority customer from the specified queue (`desk1`,`desk2`, or `desk3`). Part 2: Memory Allocation Visualization (3 Marks): - After every "serveDesk" command, draw the memory allocation for the three queues. - Your drawing should represent each queue and indicate which elements remain in each queue after the serve operation. - The drawing can be done using simple boxes in a text editor, or graphic tool. Ensure it clearly shows the queue structure and customer positions.

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!