class Leaf : Component { public Leaf(string name) : base(name) { } public override void Add(Component c) { //throw new NotImplementedException(); Console.WriteLine("Cannot add to a Leaf"); } public override void Remove(Component c) { //throw new NotImplementedException(); Console.WriteLine("Cannot remove to a Leaf"); } public override void Display(int depth) { //throw new NotImplementedException(); Console.WriteLine(new string('-', depth) + name); } }