nerdexam
Cisco

200-901 · Question #565

A developer has created a three-tier web application for network device control and management. The application consists of multiple objects assigned for different functionalities. The architecture…

The correct answer is D. It decouples the subjects from the observers. The Observer pattern is designed to establish a one-to-many dependency between objects so that when one object (the subject) changes its state, all its dependents (observers) are notified and updated automatically. The key advantage of the Observer pattern is decoupling, and…

Software Development and Design

Question

A developer has created a three-tier web application for network device control and management. The application consists of multiple objects assigned for different functionalities. The architecture of the application is based on the Observer pattern. Which advantage does this pattern provide for the application design and architecture?

Options

  • AIndependent observers are updated automatically.
  • BIt updates the state of dependent subjects directly.
  • COne observer can query the state of other subjects
  • DIt decouples the subjects from the observers.

How the community answered

(27 responses)
  • A
    4% (1)
  • C
    4% (1)
  • D
    93% (25)

Explanation

The Observer pattern is designed to establish a one-to-many dependency between objects so that when one object (the subject) changes its state, all its dependents (observers) are notified and updated automatically. The key advantage of the Observer pattern is decoupling, and this is achieved by ensuring that subjects (the objects being observed) do not need to know anything about their observers.

Topics

#Observer pattern#Design patterns#Software architecture#Decoupling

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice