SOFTWARE ENGINEERING

SOFTWARE DESIGN

DESIGN PATTERNS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
____ is a behavioral design pattern that lets you define a family of algorithms and put each of them into a separate class, and make their objects interchangeable.
A
Strategy
B
State
C
Observer
D
Memento
Explanation: 

Detailed explanation-1: -Strategy is a behavioral design pattern that lets you define a family of algorithms, put each of them into a separate class, and make their objects interchangeable. One of the dominant strategies of object-oriented design is the “open-closed principle”.

Detailed explanation-2: -Strategy is a behaviour design pattern that is used to encapsulate algorithms designed for a specific task with the ability to change during runtime. While using an application that adopts this pattern, you will need to know the behaviour of each strategy and choose the one that fits closest to your need.

Detailed explanation-3: -In Strategy pattern, a class behavior or its algorithm can be changed at run time.

There is 1 question to complete.