What is the exact definition of the strategy design pattern?
问题 I had a geek fight with someone over what the strategy pattern really is and I need a expert to settle the matter. We both agree that the strategy pattern allows for the guts of a class (e.g., the behavior) to be swapped out at runtime while maintaining the same interface. However, her contention is that "For [the algorithms] to be a strategy, You would have to get the same results". My contention is that swapping an "algorithm" or logic of a class could mean that the results of the