Question: c++ coding Part A (Savitch, Q. 8, p.786) Modify or rewrite the Queue class (Display 13.21 through 13.23) to simulate customer arrivals at the Department

c++ coding  c++ coding Part A (Savitch, Q. 8, p.786) Modify or rewrite
the Queue class (Display 13.21 through 13.23) to simulate customer arrivals at

Part A (Savitch, Q. 8, p.786) Modify or rewrite the Queue class (Display 13.21 through 13.23) to simulate customer arrivals at the Department of Motor Vehicles (DMV) counter. As customers arrive, they are given a ticket number starting a 1 and incrementing with each new customer. When a customer service agent is free, the customer with the next ticket number is called. This system results in a FIFO queue of customers ordered by ticket number. Write a program that implements the queue and simulates customers entering and leaving the queue. Input into the queue should be the ticket number and a timestamp when the ticket was entered into the queue. A ticket and its corresponding timestamp is removed when a customer service agent handles the next customer. Your program should save the length of time the last three customers spent waiting in the queue. Every time a ticket is removed from the queue, update these times and output the average of the last three customers as an estimate of how long it will take until the next customer is handled. If nobody is in the queue output that the line is empty 0 Code to compute a timestamp based on the computer's clock is given below. The time(NULL) function returns the number of seconds since January 1, 1970, on most implementations of C++ #include int main() long seconds; seconds = static-cast(time (NULL)); cout

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 Databases Questions!