Question: Initial Description Write java program to simulate printing of documents. Use a linked implementation of queue data structure. Each node will contain two items: document
Initial Description Write java program to simulate printing of documents. Use a linked implementation of queue data structure. Each node will contain two items: document ID and number of pages. The number of pages should be generated at random for each document. First, enqueue few documents to the queue. Then, dequeue documents and print them. The printing time ofa document can be simulated by pausing execution. Generate a new document and enqueue it to queue every time a document is printed. Run the simulation for 30 sec. Display the timestamp for the following actions performed for each document: Enqueue Dequeue Start printing .Finish printing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
