exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 314 discussion

Actual exam question from Cisco's 200-901
Question #: 314
Topic #: 1
[All 200-901 Questions]

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?

  • A. tight coupling
  • B. cohesion
  • C. mediation
  • D. loose coupling
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mellohello
11 months, 1 week ago
Selected Answer: D
loose coupling offers minimum dependencies and maximum flexibility between dependent objects or classes in the observer pattern. Loose coupling refers to the degree to which one object or class knows about or depends on another object or class. In the observer pattern, the object being observed (the "subject") maintains a list of dependent classes (the "observers"), but the subject and the observers have a minimal amount of knowledge about each other. This allows the subject and the observers to be changed or replaced independently without affecting the other.
upvoted 4 times
Woonesuf
9 months, 2 weeks ago
I agree. The Observer pattern provides you with the following advantages: (1) It supports the principle of loose coupling between objects that interact with each other. (2) It allows sending data to other objects effectively without any change in the Subject or Observer classes. (3) Observers can be added/removed at any point in time. From the book 'Learning Python Design Patterns - Second Edition by Chetan Giridhar'
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...