static void Main(string[] args) { var computer = new Computer(); var motherboard = new MotherBoard(100); var cpu = new Cpu(200); var ram = new Ram(300); var drive = new Ssd(400); motherboard.Add(cpu); motherboard.Add(ram); computer.Add(motherboard); computer.Add(drive); bool isEqual = computer.Price == 1000; var mPrice = motherboard.Price; var cPrice = cpu.Price; }
public PersonalComputer(Cpu cpu, BaseHardDrive hdd, RAM ram, IDrawable videoCard) : base(cpu, hdd, ram, videoCard) { }
public Laptop(Cpu cpu, BaseHardDrive hardDrives, RAM ram, IDrawable videoCard, LaptopBattery battery) : base(cpu, hardDrives, ram, videoCard) { this.battery = battery; }