Ejemplo 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);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
 public void VisitComposite(CompositeShapeAdd a_composite)
 {
     System.Console.WriteLine("Group Consisting of: ");
 }
Ejemplo n.º 4
0
 public void VisitComposite(CompositeShapeAdd a_composite)
 {
     System.Console.WriteLine("Group Consisting of: ");
 }