Assignment #5: Producer/Consumer Simulation Program (CSED25 Alexandria University)
- Design an object-oriented queueing simulation program.
- Apply different design patterns such as concurrency DP, snapshot DP, and observer DP.
- working with multi threads.
An assembly line that produces different products consists of different processing machines Ms that are responsible for processing the product at different stages and queue Qs to handle product movement between different processing stages (see figure below). In this assignment, we will develop a simulation program to simulate this production line as a queuing network.
- Users add graphically as many as they want queues and machines.
- The first queue has a random input rate.
- Each machine work in a different thread.
- Each product has a random color when it enters a machine it clones its color to the machine.
- Resimulate the system after it finishes the simulation.
- Factory design pattern
- Facade design pattern
- Observable design pattern
- Memento design pattern (snapshot)
- Producer-consumer design pattern