200-901 exam dumps

200-901 practice question 15 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 15

Select 2

You are developing a web application for a client and need to ensure the code is modular, maintainable, and allows for easy updates to UI or business logic independently. Which design pattern(s) would provide these advantages?

  1. A

    Model-View-Controller (MVC)

  2. B

    Observer

  3. C

    Singleton

  4. D

    Factory

Show answer and explanation

Correct answers: A, B

Explanation

Both the MVC and Observer design patterns align with the requirements of the scenario. MVC ensures separation of concerns between the UI, business logic, and data layers, making the application modular and maintainable. The Observer pattern aids in keeping components in sync by notifying all observers of state changes, thereby supporting modularity and scalability. The other options (Singleton and Factory) are unrelated to the specific benefits described in the scenario.

  • A. Correct.

    Model-View-Controller (MVC) promotes separation of concerns by dividing the application into three interconnected components (Model, View, Controller), making it easier to maintain and extend the application independently.

  • B. Correct.

    The Observer pattern is useful for maintaining consistent state across multiple components by notifying dependent observers of changes, which supports modularity and scalability.

  • C. Incorrect.

    Singleton is a design pattern that restricts the instantiation of a class to a single object. While it can be useful in some scenarios, it does not address the modularity or maintainability requirements of the question.

  • D. Incorrect.

    The Factory pattern focuses on creating objects without specifying the exact class of object to be created. While useful for object creation, it does not directly address the need for modularity and separation of concerns as described in the scenario.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam