Exemplo n.º 1
0
 public Cpu(byte numberOfCores, byte numberOfBits, Ram ram, VideoCard videoCard) 
 {
     this.numberOfBits = numberOfBits;
     this.ram = ram;
     this.NumberOfCores = numberOfCores;
     this.videoCard = videoCard;
 }
Exemplo n.º 2
0
 public Computer(ComputerType type, ICpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard)
 {
     this.Cpu = cpu;
     this.Ram = ram;
     this.HardDrives = hardDrives;
     this.VideoCard = videoCard;
     this.Type = type;
 }
Exemplo n.º 3
0
 public Computer(ComputerType type, IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard)
 {
     // TODO: validate
     this.Cpu = cpu;
     this.Ram = ram;
     this.HardDrives = hardDrives;
     this.VideoCard = videoCard;
     this.Motherboard = motherboard;
 }
 public override PC CreatePc()
 {
     var ram = new Ram(8);
     var videoCard = new VideoCard { IsMonochrome = false };
     var pc = new PC(new Cpu(4, 64, ram, videoCard),
         ram,
         new[] { new HardDrive(1000, false, 0) },
         videoCard);
     return pc;
 }
 public override Server CreateServer()
 {
     var ram1 = new Ram(8 * 8);
     var card = new VideoCard();
     var server = new Server(
         new Cpu(8, 64, ram1, card),
         ram1,
         new List<HardDrive> { new HardDrive(0, true, 2, new List<HardDrive> { new HardDrive(2000, false, 0), new HardDrive(2000, false, 0) }) },
         card);
     return server;
 }
 public override Laptop CreateLaptop()
 {
     var ram = new Ram(8);
     var videoCard = new VideoCard { IsMonochrome = false };
     var laptop = new Laptop(
      new Cpu(4, 32, ram, videoCard),
      ram,
      new[] { new HardDrive(1000, false, 0) },
      videoCard,
      new LaptopBatteryReal());
     return laptop;
 }
Exemplo n.º 7
0
 public ServerComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard)
     : base(ComputerType.SERVER, motherboard, cpu, ram, hardDrives, videoCard)
     {
     }
Exemplo n.º 8
0
 public LaptopComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard, LaptopBattery battery)
     : base(ComputerType.LAPTOP, motherboard, cpu, ram, hardDrives, videoCard)
 {
     this.battery = battery;
 }
Exemplo n.º 9
0
 public Motherboard(Ram ram, IVideoCard videoCard)
 {
     // TODO: validate
     this.ram = ram;
     this.videoCard = videoCard;
 }
Exemplo n.º 10
0
 public PersonalComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard)
     : base(ComputerType.PC, motherboard, cpu, ram, hardDrives, videoCard)
 {
 }
Exemplo n.º 11
0
 public Server(ICpu initialCpu, Ram initialRam, IEnumerable<HardDrive> initialHardDrives, IVideoCard initialVideoCard)
     : base(ComputerType.PC, initialCpu, initialRam, initialHardDrives, initialVideoCard)
 {
     //this.motherBoard = new Motherboard();
 }
Exemplo n.º 12
0
 public PersonalComputer(ICpu initialCpu, Ram initialRam, IEnumerable<HardDrive> initialHardDrives, IVideoCard initialVideoCard)
     : base(ComputerType.PC, initialCpu, initialRam, initialHardDrives, initialVideoCard)
 {
 }
Exemplo n.º 13
0
 public Laptop(ICpu initialCpu, Ram initialRam, IEnumerable<HardDrive> initialHardDrives, IVideoCard initialVideoCard, LaptopBatery battery) 
     : base(ComputerType.Laptop, initialCpu, initialRam, initialHardDrives, initialVideoCard)
 {
     this.battery = battery;
 }