SOFTWARE ENGINEERING

SOFTWARE DESIGN

DESIGN PATTERNS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
* When you want to use a class that’s interface isn’t compatible with your code.* When you want to use subclasses that lack common functionality and can’t be added to the superclass.Use ____ Pattern
A
Adapter
B
Bridge
C
Chain of Responsibility
D
Command
Explanation: 

Detailed explanation-1: -The adapter pattern lets classes work together that couldn’t otherwise because of incompatible interfaces.

Detailed explanation-2: -Adapter is a structural design pattern that allows objects with incompatible interfaces to collaborate.

Detailed explanation-3: -The adapter design pattern allows otherwise incompatible classes to work together by converting the interface of one class into an interface expected by the clients.

There is 1 question to complete.