コード例 #1
0
ファイル: Program.cs プロジェクト: tobias-dv-lnu/1dv607_2015
        static void Main(string[] args)
        {
            Shape rect = new Rectangle(2, 5);
            Shape circle = new Circle(2);
            CompositeShapeAdd c = new CompositeShapeAdd();

            c.Add(rect);
            c.Add(circle);

            PrintArea(c);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: tobias-dv-lnu/1dv607_2015
 public void VisitRectangle(Rectangle a_rect)
 {
     System.Console.WriteLine("Rectanlge");
 }