public Cpu(byte numberOfCores, byte numberOfBits, IRamMemory ram) { this.numberOfBits = numberOfBits; this.ram = ram; this.NumberOfCores = numberOfCores; this.videoCard = this.defaultVideoCard; }
public void GenerateRandomNumber(int minValue, int maxValue, IRamMemory ram) { Random random = new Random(); int randomNumber = random.Next(minValue, maxValue); ram.SaveInteger(randomNumber); }
public Server(ICpu cpu, IRamMemory ram, IEnumerable<IHardDrive> hardDrives) { this.Cpu = cpu; this.Ram = ram; this.HardDrives = hardDrives; this.VideoCard = this.defaultVideoCard; }
public Computer(ICpu cpu, IRamMemory ram, IVideoCard videoCard, IEnumerable<IHardDrive> hardDrives) { this.cpu = cpu; this.ram = ram; this.videoCard = videoCard; this.hardDrives = hardDrives; }
public Pc(PcBuilder builder) { this.TotalPrice = builder.TotalPrice + InitalPricePc; this.Screen = builder.Screen; this.Processor = builder.Processor; this.RamMemory = builder.RamMemory; }
public MotherBoard(IRamMemory ram, ICpu cpu, IHardDrive hardDrive, IVideoCard videoCard) { this.ram = ram; this.cpu = cpu; this.hardDrive = hardDrive; this.videoCard = videoCard; }
public PC(PcBuilder builder) { _totalPrice = builder.TotalPrice + InitialPrice; _screen = builder.Screen; _processor = builder.Processor; _ramMemory = builder.RamMemory; }
public string CalculateSquareNumber(IRamMemory ram) { int numberToProcess = this.LoadData(ram); string result = this.calculateSquareStrategy.GetSquare(numberToProcess); return result; }
public override Server ManufactureServer() { this.ram = new RamMemory(32); this.cpu = new Cpu(4, 32, this.ram); this.hardDrives = new List<HardDriver> { new HardDriver(0, true, 2, new List<HardDriver> { new HardDriver(1000, false, 0), new HardDriver(1000, false, 0) }) }; return new Server(this.cpu, this.ram, this.hardDrives); }
// The hardcoded values are used on only one place so i think that there is no need of constants. public override PersonalComputer ManufacturePC() { this.ram = new RamMemory(4); this.videoCard = new MonochromeVideoCard(); this.cpu = new Cpu(2, 64, this.ram, this.videoCard); this.hardDrives = new[] { new HardDriver(2000, false, 0) }; return new PersonalComputer(this.cpu, this.ram, this.videoCard, this.hardDrives); }
// The hardcoded values are used on only one place so i think that there is no need of constants. public override PersonalComputer ManufacturePC() { this.ram = new RamMemory(8); this.videoCard = new ColorfulVideoCard(); this.cpu = new Cpu(4, 64, this.ram, this.videoCard); this.hardDrives = new[] { new HardDriver(1000, false, 0) }; return new PersonalComputer(this.cpu, this.ram, this.videoCard, this.hardDrives); }
public override Laptop ManufactureLaptop() { this.ram = new RamMemory(8); this.videoCard = new ColorfulVideoCard(); this.cpu = new Cpu(4, 32, this.ram, this.videoCard); this.hardDrives = new[] { new HardDriver(1000, false, 0) }; IBattery battery = BatteryFactory.GetBattery(BatteryType.LaptopBattery); return new Laptop(this.cpu, this.ram, this.videoCard, this.hardDrives, battery); }
public Motherboard(IVideoCard videocard, IRamMemory ram) { this.VideoCard = videocard; this.Ram = ram; }
public Cpu(byte numberOfCores, byte numberOfBits, IRamMemory ram, IVideoCard videoCard) : this(numberOfCores, numberOfBits, ram) { this.videoCard = videoCard; }
public PcMotherBoard(IRamMemory ram, ICpu cpu, IHardDrive hardDrive, IVideoCard videoCard) : base(ram, cpu, hardDrive, videoCard) { }
public PersonalComputer(ICpu cpu, IRamMemory ram, IVideoCard videoCard, IEnumerable<IHardDrive> hardDrives) : base(cpu, ram, videoCard, hardDrives) { }
public Laptop(ICpu cpu, IRamMemory ram, IVideoCard videoCard, IEnumerable<IHardDrive> hardDrives, IBattery battery) : base(cpu, ram, videoCard, hardDrives) { this.Battery = battery; }
public Motherboard(IVideoCard videocard, IRamMemory ram) { this.VideoCard = videocard; this.Ram = ram; }
public LaptopMotherBoard(IRamMemory ram, ICpu cpu, IHardDrive hardDrive, IVideoCard videoCard, IBattery battery) : base(ram, cpu, hardDrive, videoCard) { this.Battery = battery; }
public PcBuilder WithRamMemory(IRamMemory RamMemory) { this.RamMemory = RamMemory; this.TotalPrice += RamMemory.Prix; return(this); }
private int LoadData(IRamMemory ram) { return ram.LoadInteger(); }
public PcBuilder WithRamMemory(IRamMemory ramMemory) { RamMemory = ramMemory; TotalPrice += ramMemory.Price; return(this); }
private void SaveData(int numberToStore, IRamMemory ram) { ram.SaveInteger(numberToStore); }