Пример #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());
        }
Пример #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());
        }