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