Пример #1
0
 public override void Remove(Component component)
 {
     _children.Remove(component);
 }
Пример #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;
 }
Пример #3
0
 public override void Add(Component component)
 {
     _children.Add(component);
 }
Пример #4
0
 public abstract void Remove(Component c);
Пример #5
0
 public abstract void Add(Component c);
Пример #6
0
 public override void Remove(Component c)
 {
     Console.WriteLine("Cannot remove from a leaf");
 }
Пример #7
0
 public override void Add(Component c)
 {
     Console.WriteLine("Cannot add to a leaf");
 }