Combining the Factory and Strategy Patterns

Download full source code. I was recently talking with a friend about the factory and strategy patterns, how they could be used together. He was familiar with the factory, but not the strategy. The factory lets you create the kind of object you want on the fly without explicitly calling new on a concrete class. The strategy pattern lets you execute some method defined in an interface without…