Oracle
1Z0-807 · Question #12
Which two are objectives of the Strategy pattern?
The correct answer is A. To provide a way to configure a class with one of many behaviors E. To define a family of algorithms, encapsulate each one, and make them interchangeable. See the full explanation below for the reasoning.
Question
Which two are objectives of the Strategy pattern?
Options
- ATo provide a way to configure a class with one of many behaviors
- BTo define an object that encapsulates how a set of objects interacts
- CTo define the skeleton of an algorithm, deferring some steps to subclasses
- DTo decouple an abstraction horn its implementation so that the two can vary independently
- ETo define a family of algorithms, encapsulate each one, and make them interchangeable
- FTo allow subclasses to redefine certain steps of an algorithm without changing the algorithm's structure
How the community answered
(62 responses)- A77% (48)
- B6% (4)
- C2% (1)
- D2% (1)
- F13% (8)
Community Discussion
No community discussion yet for this question.