コード例 #1
0
ファイル: Program.cs プロジェクト: tobias-dv-lnu/1dv607
        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
ファイル: Program.cs プロジェクト: tobias-dv-lnu/1dv607_2015
        static void PrintArea(Shape a_shape)
        {
            ShapeVisitor v = new ConsolePrintShapeVisitor();

            a_shape.Accept(v);

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