Activity 01
Simulation Game: The Printer Queue
Students act as print jobs arriving at different times. The 'printer' (one designated student) processes jobs strictly in arrival order. After one round, introduce a priority variant where urgent jobs jump ahead. The class compares the two systems, discussing fairness, throughput, and starvation, making the design trade-offs tangible before they appear in code.
Compare the operational principles of stacks and queues and their respective use cases.
Facilitation TipDuring the Printer Queue simulation, hand out sticky notes so students can physically pass tasks to the 'printer' and witness gaps in the array grow visibly.
What to look forPresent students with a sequence of enqueue and dequeue operations on a queue. Ask them to trace the state of the queue after each operation and identify the element that will be dequeued next. Example: Given enqueue(A), enqueue(B), dequeue(), enqueue(C), dequeue(), what is the next element to be dequeued?