프로그래밍/디자인패턴
-
Strategy프로그래밍/디자인패턴 2012. 11. 19. 10:38
Strategy Motivation There are common situations when classes differ only in their behavior. For this cases is a good idea to isolate the algorithms in separate classes in order to have the ability to select different algorithms at runtime. Intent Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that us..