Design Patterns · Junior · Question 20 of 75
What does a Mediator do?
- ✓Correct answer: Centralizes interaction between objects so they don't reference each other
- 2Passes a request along a chain of handlers until one handles it
- 3Creates a copy of an object for safe modification
Explanation
Form components don't call each other directly; they notify a mediator (the parent, a form controller), which decides what to change. This reduces "everyone with everyone" links. The risk is the mediator growing into an overly smart object.