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

  • Strategy - declares an interface common to all supported algorithms. Context uses this interface to call the algorithm defined by a ConcreteStrategy.
  • ConcreteStrategy - implements the algorithm using the Strategy interface.
  • Context - is configured with a ConcreteStrategy object. It maintains a reference to a Strategy object. It may define an interface that lets Strategy access its data.
  Name Size Creator (Last Modifier) Creation Date Last Mod Date Comment  
GIF File StrategyPatternUML.gif 4 kB Cody Burleson Jul 28, 2007 Jul 28, 2007 Strategy Pattern UML

Labels:

Enter labels to add to this page:
Wait Image 
Tip: Looking for a label? Just start typing.