Hopefully where you have '// Use Strategy X' you are instantiating a particular strategy object and then using that instance when you instantiate your context object. If you are not doing that then you are not really using the strategy pattern.
Yes. This is where I'm instantiating the required Strategy object ... so I think I'm O.K. I'm really trying to see if there's a pattern-based way to determine which Strategy to instantiate instead of using a switch statement ... which O.K. I guess ... doesn't use of the Factory method pattern really refer to subclass creation. I guess I could think of the Strategies as subclasses and then it fits. =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
