strategy design pattern
-
StrategyModeling/DesignPattern 2020. 2. 26. 00:42
1. Overview Strategy pattern allows us to encapsulate an algorithm in a class. So we can configure our context or main object with an object of this class, to change the algorithm used to perform given operation. This is helpful if you have many possible variations of an algorithm. A good indication for the applicability of strategy pattern is if we find different algorithms/behaviors in our met..