The Mediator Design Pattern is used to design encapsulation for interaction among objects. It helps design a loose coupling by preventing objects from referring to each other directly. This allows to vary their interactions independently.
Description for the problem, the solution, the explanation, and the implementation for Mediator.
Description for the problem, the solution, the explanation, and the implementation for Mediator.