![Hands-On Design Patterns with Java](https://wfqqreader-1252317822.image.myqcloud.com/cover/688/36698688/b_36698688.jpg)
上QQ阅读APP看书,第一时间看更新
Use case
To demonstrate the mediator design pattern, we will emulate a widget production system that includes a hopper for parts, a starter to start the system, an assembly system to combine hopper components, an accelerator, and an emergency break to manage the speed of the system.
There are inter-relations between the various components for our mediator to manage. These inter-relationships are detailed here:
![](https://epubservercos.yuewen.com/A2D5A8/19470379708814006/epubprivate/OEBPS/Images/3.jpg?sign=1739178261-A0IiJ1VBQ5e6GtCCdjOTaUpodeoxpFMe-0-cb4b3f603fee07537f431a795b103fce)
Widget production system inter-relationships
As you can see from the table, there are 16 inter-relationships among the 5 system components for the mediator to manage.