← Back to Test

Problem 5 - Entrance Test

Which design pattern promotes loose coupling between objects by defining a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically?

Correct: B

The Observer pattern defines a one-to-many dependency between objects so that when one object (the subject) changes state, all its dependents (observers) are notified and updated automatically. This promotes loose coupling because the subject doesn't need to know the specific classes of its observers.