Design Patterns - Intermédiaire

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Anis ZOUAOUI
A
Anis ZOUAOUI
Community Contributor
Quizzes Created: 2 | Total Attempts: 897
Questions: 5 | Attempts: 385

SettingsSettingsSettings
Design Patterns - Intermédiaire - Quiz

.


Questions and Answers
  • 1. 

    Encapsuler l'appel aux méthodes (requêtes), correspond à quel Design Pattern ?

    • A.

      Strategy

    • B.

      Command

    • C.

      Template

    • D.

      Façade

    Correct Answer
    B. Command
    Explanation
    The correct answer is Command. In software engineering, the Command design pattern is used to encapsulate a request as an object, allowing the requester to parameterize clients with queues, requests, and operations. This pattern decouples the sender and receiver of a command by encapsulating the request as an object, which allows for the parameterization of clients with queues, requests, and operations.

    Rate this question:

  • 2. 

    Encapsuler la complexité d'un sous système, correspond à quel Design Pattern ?

    • A.

      Strategy

    • B.

      Command

    • C.

      Template

    • D.

      Façade

    Correct Answer
    D. Façade
    Explanation
    The correct answer is Façade. The Façade design pattern is used to encapsulate the complexity of a subsystem and provide a simplified interface to clients. It provides a unified interface that hides the complexities of the subsystem and allows clients to interact with the subsystem through the façade object. This helps in reducing the dependencies between the client and the subsystem, making the system easier to understand and maintain.

    Rate this question:

  • 3. 

    Lequel est qualifié comme un Structural Design Pattern ?

    • A.

      Strategy

    • B.

      Command

    • C.

      Template

    • D.

      Façade

    Correct Answer
    D. Façade
    Explanation
    The correct answer is "Façade." A façade is a Structural Design Pattern that provides a simplified interface to a complex system of classes or objects. It allows clients to interact with the system through a single interface, hiding the complexities and dependencies of the underlying subsystem. This pattern promotes loose coupling and improves the maintainability and reusability of the code. The other options, Strategy, Command, and Template, are behavioral design patterns, not structural design patterns.

    Rate this question:

  • 4. 

    Convertir une ancienne interface à une nouvelle qui répond aux besoins du client ?

    • A.

      Bridge

    • B.

      Decorator

    • C.

      Adapter

    • D.

      Composite

    Correct Answer
    C. Adapter
    Explanation
    The correct answer is Adapter. An adapter pattern is used to convert the interface of one class into another interface that the client expects. In this scenario, the old interface needs to be converted to a new interface that meets the client's requirements. The adapter pattern allows the new interface to work with the existing code without modifying it.

    Rate this question:

  • 5. 

    Attacher des nouvelles responsabilités à un objet dynamiquement?

    • A.

      Bridge

    • B.

      Decorator

    • C.

      Adapter

    • D.

      Composite

    Correct Answer
    B. Decorator
    Explanation
    The Decorator pattern allows for dynamically attaching additional responsibilities to an object. It provides a flexible alternative to subclassing for extending functionality. The Decorator pattern involves creating a decorator class that wraps the original object and adds new behaviors or responsibilities at runtime. This allows for the addition of new features without modifying the original object's structure. In the given scenario, using the Decorator pattern would be the correct choice for attaching new responsibilities to an object dynamically.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 11, 2016
    Quiz Created by
    Anis ZOUAOUI
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.