Multiple choice technology architecture

Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically

  1. Visitor Pattern

  2. Notifier Pattern

  3. Observer Pattern

  4. Template Pattern

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Observer pattern establishes a one-to-many relationship where a subject (the object being observed) automatically notifies all registered observers when its state changes. This enables loose coupling between objects since observers don't need to know about each other. The Visitor pattern is for separating algorithms from object structures, Template Pattern defines the skeleton of an algorithm in a base class, and 'Notifier Pattern' is not a standard GoF pattern.