In
computer programming, the
strategy pattern (also known as the
policy pattern) is a particular
software design pattern, whereby
algorithms can be selected at runtime. Formally speaking, the strategy pattern defines a family of
algorithms,
encapsulates each one, and makes them interchangeable. Strategy lets
the algorithm vary independently from clients that use it.
Called ConcreteStrategyAdd's execute()
Called ConcreteStrategySubtract's execute()
Called ConcreteStrategyMultiply's execute()
http://en.wikipedia.org/wiki/Strategy_pattern
No comments:
Post a Comment