Skip to content
rewind927 edited this page Jan 21, 2015 · 11 revisions

Intent:

Define a family of algorithms, encapsulate each one, and make them interchangeable.
Strategy lets the algorithm vary independently from clients that use it.

Structure:

Example:

Duck

Use Strategy Pattern:

Reference:

http://en.wikipedia.org/wiki/Strategy_pattern#Strategy_and_open.2Fclosed_principle

Clone this wiki locally