When would you use the Mediator pattern?

  1. When you need to co-ordinate state changes between other objects by using one object.

  2. When you need to add functionality to a class without changing its interface.

  3. When you need create a separation between abstractions and classes that implement those abstractions.

  4. You need a class that will be used in lots of different applications where the logic will only change slightly.


Correct Option: A

Find more quizzes: