Introduction to the Strategy design pattern-The CodeGain(www.codegain.com)
submitted by
codegain(2794) 1 year, 7 months ago
The Strategy pattern involves separating an algorithm from its host class and putting it in a separate class. When there are multiple strategies available for an algorithm, for a given problem it is always better to separate them in to different objects. If the algorithms are all kept in the one class, the class will be become a big messy conditional statements.
|category: Patterns
|Views: 9
tags:
Patterns another
Everyones tags:
Your Tags: