Q: 18
A developer creates a program in which an object maintains a list of classes based on the observer
pattern. The classes are dependent on the object. Whenever the state of the object changes, it
notifies the dependent classes directly through callbacks. Which advantage of the observer pattern
offers minimum dependencies and maximum flexibility between dependent objects or classes?
Options
Discussion
D imo, loose coupling is exactly what the observer pattern is for. A is a trap, since observer reduces tight coupling. Pretty sure about this from practice questions.
Is the question asking for the main benefit or just any feature? That would affect if D is right.
Be respectful. No spam.
Question 18 of 35