Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public void VisitRectangle(Rectangle a_rect)
 {
     System.Console.WriteLine("Rectanlge");
 }