for each second (current_second)does new print task get createdif soadd it to the queue with the current_second as the timestamp if the printer is not busy and if task is waitingremove the next task from the print queue and assign it to the printer subtract the timestamp from the current_second to compute the waiting time for that task append the waiting time for that task to list for later processing based on the number of pages in the print taskfigure out how much time will be required the printer now does one second of printing if necessary it also subtracts one second from the time required for that task if the task has been completedin other words the time required has reached zerothe printer is no longer busy after the simulation is completecompute the average waiting time from the list of waiting times generated python implementation to design this simulation we will create classes for the three real-world objects described aboveprintertaskand printqueue the printer class will need to track whether it has current task if it doesthen it is busy and the amount of time needed can be computed from the number of pages in the task the constructor will also allow the pages-per-minute setting to be initialized the tick method decrements the internal timer and sets the printer to idle if the task is completed class printerdef __init__(selfppm)self page_rate ppm self current_task none self time_remaining def tick(self)if self current_task !noneself time_remaining self time_remaining if self time_remaining < self current_task none def busy(self)if self current_task !nonereturn true elsereturn false basic data structures