Questions tagged as 'strategy-pattern'

1
answer

PHP: Interface type attribute

I am doing a study of Project Patterns. My first pattern is Strategy, where I have an abstract class that has two attributes that should instantiate a class that implements a given interface. The interfaces: interface FlyBehavior { publ...
asked by 07.09.2017 / 17:53
2
answers

How to instantiate Strategy objects

Consider the basic implementation of the Strategy pattern. public class Context{ private Strategy strategy; } public interface Strategy{ void algoritmo(); } public class ConcreteStrategyA implements Strategy{ void algoritmo(){ //...
asked by 14.12.2018 / 16:12