Esempio n. 1
0
        static void PrintArea(Shape a_shape)
        {
            ShapeVisitor v = new ConsolePrintShapeVisitor();

            a_shape.Accept(v);

            System.Console.WriteLine("Area is: {0}", a_shape.GetArea());
        }
Esempio n. 2
0
        static void PrintArea(Shape a_shape)
        {
            ShapeVisitor v = new ConsolePrintShapeVisitor();

            a_shape.Accept(v);

            System.Console.WriteLine("Area is: {0}", a_shape.GetArea());
        }