Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Number     five       = new Number(5);
            Calculator calculator = new Calculator(new SquareCommand(five), new CubeCommand(five));

            calculator.Cube();
            Console.WriteLine($"Value: {five.GetValue}");

            calculator.CubeRoot();
            Console.WriteLine($"Value: {five.GetValue}");

            Console.ReadLine();
        }