Difference between revisions of "Strategy"

From CDOT Wiki
Jump to: navigation, search
Line 11: Line 11:
  
 
==Code Sample==
 
==Code Sample==
===C++===
 
===C#===
 

Revision as of 17:43, 7 February 2007


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