Question
Write a C++ program to simulate customer arrival at the Department of Motor Vehicles counter. As customers arrive, they are given a ticket number starting
Write a C++ program to simulate customer arrival at the Department of Motor Vehicles counter.
As customers arrive, they are given a ticket number starting at 1 and increment with each new customer. when a customer service agent is free, the customer with the next ticket is called. This system results in FIFO queue of customers ordered by ticket number. Your program will implement the queue and simulate customers entering and leaving the queue. Input into the queue should be the ticket number and time stamp when the ticket was entered into the queue. A ticket and its time stamp are removed from the queue when a customer service agent starts handling the next customer in the queue. The program should keep track and print waiting time for that customer. The program will also simulate the varying times of handling a customer by a customer service agent. If no body is in the queue, output that the line is empty.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started