Example #1
0
 public override void Remove(Component component)
 {
     _children.Remove(component);
 }
Example #2
0
 public Computer(Component CPU, Component GPU, Component Mobo, Component Disk, Component PSU, Component Case, Component RAM)
 {
     this.RAM = RAM;
     this.Processor = CPU;
     this.GPU = GPU;
     this.Motherboard = Mobo;
     this.Disk = Disk;
     this.Case = Case;
     this.PSU = PSU;
     this.Price = this.Processor.Price + this.GPU.Price + this.Motherboard.Price + this.Disk.Price +
                  this.PSU.Price + this.RAM.Price + this.Case.Price;
 }
Example #3
0
 public override void Add(Component component)
 {
     _children.Add(component);
 }
Example #4
0
 public abstract void Remove(Component c);
Example #5
0
 public abstract void Add(Component c);
Example #6
0
 public override void Remove(Component c)
 {
     Console.WriteLine("Cannot remove from a leaf");
 }
Example #7
0
 public override void Add(Component c)
 {
     Console.WriteLine("Cannot add to a leaf");
 }