Strategy

From CDOT Wiki
Revision as of 16:43, 7 February 2007 by Rfainsht (talk | contribs)
Jump to: navigation, search


Defenition

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


UML Diagram

Strategy.gif

Code Sample

C++

C#