Quantcast
Channel: Frank Sun » Design Pattern
Viewing all articles
Browse latest Browse all 13

Strategy Pattern

$
0
0
from: http://www.oodesign.com/strategy-pattern.html Motivation There are common situations when classes differ only in their behavior. For this cases is a good idea to isolate the algorithms in separate classes in order to have the ability to select different algorithms at runtime. Intent Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the Read More →

Viewing all articles
Browse latest Browse all 13

Trending Articles