At ProProfs Quizzes, our dedicated in-house team of experts takes pride in their work. With a sharp eye for detail, they meticulously review each quiz. This ensures that every quiz, taken by over 100 million users, meets our standards of accuracy, clarity, and engagement.
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.