Question: in python with comment Register a customer - Prompt the user for his/her name - Add him/her into the wait queue with the details: queue
Register a customer - Prompt the user for his/her name - Add him/her into the wait queue with the details: queue number, customer name and the number of calls missed. Set to 0 initially. Call Next customer - Display that there is no customer in wait queue if the queue is empty. - Otherwise, display the queue number of the first customer in the wait queue. - If the customer responds to the call, he is removed from the wait queue, and put into another queue called "customer served". Display a message to indicate that the customer has been served. - If the customer misses the call when his queue number is called, add 1 to the number of call he misses. - If the number of calls missed becomes 3 , the customer is put to the end of the wait queue. Reset his number of call missed to zero. Display a message to indicate that the customer has been placed to the end of the wait queue. The next customer in the wait queue is called, and the same process is repeated until one customer responds to the call or until the end of the wait queue is reached. List Customers in Queue - Display that there is no customer in wait queue if the wait queue is empty. - Display a header for the customer detail: queue number, customer name, number of missed calls. - Display the details of customers in the wait queue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
