Quiz: The Strategy Pattern
Test your knowledge of the Strategy Pattern concepts with this quiz.
1
From a 10,000 feet view, the structure of a State and Strategy implementation might look similar. However, the patterns differ in their intent. There’s also one typical difference in the implementation of State vs Strategy:
A)
Strategyis always implemented as a First-Class ADT.
B)
State typically has a link to data owned by the calling context to initiate a state transition.
C)
Strategy represents a separation of concerns, whereas State doesn’t.
Question 1 of 40 attempted
Get hands-on with 1300+ tech skills courses.