Most voted "strategy-pattern" questions
6 questions
Sort by count of
-
7
votes2
answers408
viewsWhat is Strategy Pattern?
I was reading about Strategy Pattern, however, I could not understand it very well and I was confused about its functioning. Doubts What is the Strategy Pattern? In which scenarios should I use it?…
-
4
votes1
answer80
viewsUsing the Strategy standard when it affects other parts of the system
... serves to define a family of algorithms, encapsulate each of them and make them interchangeable. Strategy allows the algorithm to vary regardless of the clients using it. Okay, I get it. But…
-
3
votes2
answers82
viewsHow to instantiate Strategy objects
Consider the basic implementation of the standard Strategy. public class Context{ private Strategy strategy; } public interface Strategy{ void algoritmo(); } public class ConcreteStrategyA…
-
3
votes1
answer141
viewsWhat is the difference between Strategy Pattern and Specification Pattern
I’m implementing a app CLI in C# of old game and wanted to know which is the best Pattern to use to make the "AI" that would be the player vs computer in the case. I’ve been looking at some Patterns…
-
2
votes1
answer103
viewsPHP: Interface type attribute
I’m doing a study of Project Standards. My first standard is Strategy, where I have an abstract class that has two attributes that should receive instances of a class that implements a certain…
-
-1
votes1
answer39
viewsWhat does the context class do for the Strategy design standard?
If Strategy uses its abstract class as a means of instantiating concrete implementations, what is the function of the context? In certain materials it was cited that this patter design would be…