"Queueing theory is the study of models of service systems in which tasks wait to be processed. The objectives of the theory are to predict the delays faced by tasks before their processing is completed and also the backlog of tasks waiting to be processed. The theory is used to design the telephone network, computer systems, manufacturing plants, and computer networks. A queue is a service facility equipped with a waiting room. Using the standard terminology, customers arrive at the queue where they are required to spend some time, called a service time, with a server. There may be more than one server, and customers may have to wait for an available server. The customers leave the queue once they have received their amount of service time."
You are to write a program that models a printer queue. Your program will read in a list of print jobs. Each print job contains a computer number requesting the print job, the time the printing is submitted and the number of pages to be printed. If nothing is being printed, the print job submitted is immediately sent to the printer and printed. If there is a job already being printed, then the new print job is entered at the rear of the queue. When a print job finishes, the queue is checked and if it is not empty then the first job in the queue is removed from the queue and it is printed. You can assume that the printer prints at a speed of 4 pages per minute.
After all the print jobs have been processed, your program should print the following results: