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(); }
public App(IInputStrategy inputStrategy, CalculationStrategy calculationStrategy, DisplayStrategy displayStrategy) { _inputStrategy = inputStrategy; _calculationStrategy = calculationStrategy; _displayStrategy = displayStrategy; }