Strategy Pattern
Strategy Pattern
According to Head First: Design Pattern, the defition of strategy pattern (策略模式) is
family of algorithms, encapsulated each one, and makes them interchangeable. Strategy lets the algorithm vary independently from cloents that use it.