Exemple #1
0
        static void Main(string[] args)
        {
            int target = 10;

            IInputStrategy inputStrategy = new ConsoleInputStrategy(target);

            ICalculationStrategy calculationStrategy = new CalculationStrategy(target);

            IDisplayStrategy displayStrategy = new DisplayStrategy();

            new App(inputStrategy, calculationStrategy, displayStrategy).Run();

            Console.ReadLine();
        }
Exemple #2
0
 public App(IInputStrategy inputStrategy, CalculationStrategy calculationStrategy, DisplayStrategy displayStrategy)
 {
     _inputStrategy       = inputStrategy;
     _calculationStrategy = calculationStrategy;
     _displayStrategy     = displayStrategy;
 }