Which two are objectives of the Strategy pattern?

Which two are objectives of the Strategy pattern?

Which two are objectives of the Strategy pattern?

A.
To allow subclasses to redefine certain steps of an algorithm without changing the
algorithm’s structure

B.
To provide a way to configure a class with one of many behaviors

C.
To define an object that encapsulates how a set of objects interacts

D.
To define the skeleton of an algorithm, deferring some steps to subclasses

E.
To decouple an abstraction horn its implementation so that the two can vary
independently

F.
To define a family of algorithms, encapsulate each one, and make them interchangeable



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Ashishkumar

Ashishkumar

A and D is wrong – Template pattern
C is wrong – MEdiator Pattern
E is wrong Bridge pattern

Hence B and F is correct answer.