示例#1
0
文件: Cpu.cs 项目: didimitrov/Algo
 public Cpu(IRam ram, IVideoCard videoCard, byte numberOfCores, CpuArchitecture architecture)
 {
     this.Ram = ram;
     this._videoCard = videoCard;
     NumberOfCores = numberOfCores;
     this.Architecture = architecture;
 }
示例#2
0
 public Computer(ICpu cpu, IRamMemory ram, IVideoCard videoCard, IEnumerable<IHardDrive> hardDrives)
 {
     this.cpu = cpu;
     this.ram = ram;
     this.videoCard = videoCard;
     this.hardDrives = hardDrives;
 }
示例#3
0
 public MotherBoard(IRamMemory ram, ICpu cpu, IHardDrive hardDrive, IVideoCard videoCard)
 {
     this.ram = ram;
     this.cpu = cpu;
     this.hardDrive = hardDrive;
     this.videoCard = videoCard;
 }
示例#4
0
 public Computer(ICpu cpu, IRam ram, IVideoCard gpu, IStorage storage)
 {
     Storage = storage;
     Gpu = gpu;
     Ram = ram;
     Cpu = cpu;
 }
示例#5
0
 public Cpu(byte numberOfCores, byte numberOfBits, IRamMemory ram)
 {
     this.numberOfBits = numberOfBits;
     this.ram = ram;
     this.NumberOfCores = numberOfCores;
     this.videoCard = this.defaultVideoCard;
 }
示例#6
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;
 }
示例#7
0
 protected Computer(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable<HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard)
 {
     this.CentralProcessingUnit = cpu;
     this.RandomAcessMemory = ram;
     this.HardDrives = hardDrives;
     this.VideoCard = videoCard;
     this.MotherBoard = motherBoard;
 }
 public BaseComputer(ICpu cpu, IRam ram, IVideoCard videoCard, IEnumerable <IHardDrive> hardDrives)
 {
     this.CPU         = cpu;
     this.Ram         = ram;
     this.HardDrives  = hardDrives;
     this.VideoCard   = videoCard;
     this.Motherboard = new MotherBoard(videoCard, ram, cpu);
 }
示例#9
0
 protected Computer(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard)
 {
     this.cpu = cpu;
     this.ram = ram;
     this.videoCard = videoCard;
     this.hardDriveRaid = hardDriveRaid;
     this.motherBoard = motherBoard;
 }
示例#10
0
 protected Computer(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard)
 {
     this.cpu           = cpu;
     this.ram           = ram;
     this.videoCard     = videoCard;
     this.hardDriveRaid = hardDriveRaid;
     this.motherBoard   = motherBoard;
 }
示例#11
0
 public Computer(ICpu cpu, IRam ram, IEnumerable <IHardDriver> driver, IVideoCard videoCard)
 {
     this.Cpu         = cpu;
     this.Ram         = ram;
     this.Driver      = driver; // to do
     this.VideoCard   = videoCard;
     this.Motherboard = new Motherboard(this.Cpu, this.Ram, this.VideoCard);
 }
示例#12
0
        internal Computer(IRam ram, ICpu cpu, IEnumerable <IHardDrive> drives, IVideoCard videoCard)
        {
            this.Ram       = ram;
            this.Cpu       = cpu;
            this.Drives    = drives;
            this.VideoCard = videoCard;

            this.motherboard = new Motherboard(ram, cpu, videoCard);
        }
示例#13
0
 public Cpu(
     byte numberOfCores,
     IRam ram,
     IVideoCard videoCard)
 {
     this.NumberOfCores = numberOfCores;
     this.Ram           = ram;
     this.VideoCard     = videoCard;
 }
示例#14
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;
 }
示例#15
0
 internal Laptop(
     Cpu cpu,
     Ram ram,
     IEnumerable <IHardDrive> hardDrives,
     IVideoCard videoCard,
     LaptopBattery battery)
     : base(cpu, ram, hardDrives, videoCard)
 {
     this.battery = battery;
 }
示例#16
0
        public Motherboard(ICpu cpu, IRam ram, IVideoCard videoCard)
        {
            cpu.Motherboard = this;
            this.Cpu        = cpu;

            ram.Motherboard = this;
            this.Ram        = ram;

            videoCard.Motherboard = this;
            this.VideoCard        = videoCard;
        }
示例#17
0
        public MotherBoard(IVideoCard videoCard, IRam ram, ICpu cpu)
        {
            videoCard.Motherboard = this;
            this.VideoCard        = videoCard;

            ram.Motherboard = this;
            this.Ram        = ram;

            cpu.Motherboard = this;
            this.Cpu        = cpu;
        }
示例#18
0
文件: Computer.cs 项目: Tectonik/Exam
        protected Computer(
				  Cpu cpu,
				  Rammstein ram,
				  IEnumerable<HardDrive> hardDrives,
				  IVideoCard videoCard)
        {
            Cpu = cpu;
            this.Ram = ram;
            this.HardDrives = hardDrives;
            this.VideoCard = videoCard;
        }
示例#19
0
        public Motherboard(ICpu cpu, IRam ram, IVideoCard videoCard)
        {
            cpu.Motherboard = this;
            this.Cpu = cpu;

            ram.Motherboard = this;
            this.Ram = ram;

            videoCard.Motherboard = this;
            this.VideoCard = videoCard;
        }
示例#20
0
 internal Computer(
     ICpu cpu,
     Ram ram,
     IEnumerable <IHardDrive> hardDrives,
     IVideoCard videoCard)
 {
     this.Cpu        = cpu;
     this.Ram        = ram;
     this.HardDrives = hardDrives;
     this.VideoCard  = videoCard;
 }
示例#21
0
 protected Computer(
     ICpu cpu,
     IRam ram,
     IEnumerable<IHardDrive> hardDrives,
     IVideoCard videoCard)
 {
     this.Cpu = cpu;
     this.Ram = ram;
     this.HardDrives = hardDrives;
     this.VideoCard = videoCard;
     this.Motherboard = new Motherboard(this.Cpu, this.Ram, this.VideoCard);
 }
示例#22
0
 protected Computer(
     ICpu cpu,
     IRam ram,
     IEnumerable <IHardDrive> hardDrives,
     IVideoCard videoCard)
 {
     this.Cpu         = cpu;
     this.Ram         = ram;
     this.HardDrives  = hardDrives;
     this.VideoCard   = videoCard;
     this.Motherboard = new Motherboard(this.Cpu, this.Ram, this.VideoCard);
 }
        // 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);
        }
示例#26
0
 public Computer(
         ComputerType type,
         Cpu cpu, 
         Ram ram,
         IEnumerable<HardDrive> hardDrives,
         IVideoCard videoCard,
         LaptopBattery battery)
 {
     this.Cpu = cpu;
     this.Ram = ram;
     this.HardDrives = hardDrives;
     this.VideoCard = videoCard;
     this.battery = battery;
 }
示例#27
0
        internal Computer(
            string type,
            Cpu cpu,
            RAMMemory ram,
            IEnumerable<HardDriver> hardDrives,
            IVideoCard videoCard,
            LaptopBattery battery)
        {
            this.type = type;
            this.Cpu = cpu;
            this.Ram = ram;
            this.HardDrives = hardDrives;
            this.VideoCard = videoCard;

            this.battery = battery;
            this.motherBoard = new MotherBoard(this.Cpu, this.Ram, this.VideoCard);
        }
示例#28
0
 public MotherBoard(Cpu cpu, RAMMemory ram, IVideoCard videoCard)
 {
     this.cpu = cpu;
     this.ram = ram;
     this.videoCard = videoCard;
 }
示例#29
0
 public Motherboard(IRam ram, ICpu cpu, IVideoCard videoCard)
 {
     this.ram       = ram;
     this.videoCard = videoCard;
     cpu.AttachToMotherboard(this);
 }
示例#30
0
 protected Desktop(ICpu cpu, IMotherBoard motherBoard, IVideoCard videoCard)
 {
     _cpu         = cpu;
     _motherBoard = motherBoard;
     _videoCard   = videoCard;
 }
示例#31
0
 public Motherboard(RandomAcessMemory ram, IVideoCard videoCard)
 {
     this.RandomAcessMemory = ram;
     this.VideoCard         = videoCard;
 }
示例#32
0
 public Server(IRam ram, ICpu cpu, IEnumerable <IHardDrive> drives, IVideoCard videoCard)
     : base(ram, cpu, drives, videoCard)
 {
 }
 public PersonalComputer(IRam ram, ICpu cpu, IEnumerable <IHardDrive> drives, IVideoCard videoCard)
     : base(ram, cpu, drives, videoCard)
 {
 }
 public Motherboard(IVideoCard videocard, IRamMemory ram)
 {
     this.VideoCard = videocard;
     this.Ram = ram;
 }
示例#35
0
 public Laptop(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable <HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard, LaptopBattery battery)
     : base(cpu, ram, hardDrives, videoCard, motherBoard)
 {
     this.LaptopBattery = battery;
 }
示例#36
0
文件: Server.cs 项目: didimitrov/Algo
 public Server(ICpu cpu, IRam ram, IVideoCard gpu, IStorage storage)
     : base(cpu, ram, new MonochromVideoCard(), storage)
 {
 }
示例#37
0
 public Laptop(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable<HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard, LaptopBattery battery)
     : base(cpu, ram, hardDrives, videoCard, motherBoard)
 {
     this.LaptopBattery = battery;
 }
示例#38
0
 public Laptop(ICpu cpu, IRam ram, IEnumerable <IHardDriver> driver, IVideoCard videoCard, ILaptopBattery battery) :
     base(cpu, ram, driver, videoCard)
 {
     this.battery = battery;
 }
示例#39
0
 public Pc(ICpu cpu, IRam ram, IEnumerable <IHardDrive> hardDrives, IVideoCard videoCard)
     : base(cpu, ram, hardDrives, videoCard)
 {
 }
示例#40
0
 public PersonalComputer(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable <HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard)
     : base(cpu, ram, hardDrives, videoCard, motherBoard)
 {
 }
 public Laptop(ICpu cpu, IRam ram, IVideoCard videoCard, IEnumerable <IHardDrive> hardDrives) : base(cpu, ram, videoCard, hardDrives)
 {
     this.LaptopBattery = new LaptopBattery();
 }
示例#42
0
 public Motherboard(IRam ram, IVideoCard videoCard)
 {
     this.Ram = ram;
     this.VideoCard = videoCard;
 }
示例#43
0
 public Server(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable <HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard)
     : base(cpu, ram, hardDrives, videoCard, motherBoard)
 {
     this.CheckIfVideoCardIsMonochrome();
 }
示例#44
0
 public ServerComputer(IMotherboard motherboard, Cpu cpu, Ram ram, IEnumerable<HardDrive> hardDrives, IVideoCard videoCard)
     : base(ComputerType.SERVER, motherboard, cpu, ram, hardDrives, videoCard)
     {
     }
示例#45
0
 public Laptop(ICpu cpu, IRam ram, IEnumerable <IHardDrive> hardDrives, IVideoCard videoCard, IBattery battery)
     : base(cpu, ram, hardDrives, videoCard)
 {
     this.battery = battery;
 }
示例#46
0
 public PcMotherBoard(IRamMemory ram, ICpu cpu, IHardDrive hardDrive, IVideoCard videoCard)
     : base(ram, cpu, hardDrive, videoCard)
 {
 }
示例#47
0
 protected Computer(CentralProcessingUnit cpu, RandomAcessMemory ram, IEnumerable <HardDriver> hardDrives, IVideoCard videoCard, IMotherboard motherBoard)
 {
     this.CentralProcessingUnit = cpu;
     this.RandomAcessMemory     = ram;
     this.HardDrives            = hardDrives;
     this.VideoCard             = videoCard;
     this.MotherBoard           = motherBoard;
 }
示例#48
0
 public Pc(ICpu cpu, IRam ram, IEnumerable<IHardDrive> hardDrives, IVideoCard videoCard)
     : base(cpu, ram, hardDrives, videoCard)
 {
 }
示例#49
0
 protected PersonalComputer(ICpu cpu, IRam ram, IVideoCard gpu, IStorage storage)
     : base(cpu, ram, gpu, storage)
 {
 }
示例#50
0
 public Motherboard(Ram ram, IVideoCard videoCard)
 {
     this.ram = ram;
     this.videoCard = videoCard;
 }
 public PC(ICpu cpu, IRam ram, IVideoCard videoCard, IEnumerable <IHardDrive> hardDrives) : base(cpu, ram, videoCard, hardDrives)
 {
 }
示例#52
0
 public Motherboard(IRam ram, IVideoCard videoCard)
 {
     this.Ram       = ram;
     this.VideoCard = videoCard;
 }
示例#53
0
 public PC(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard) 
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
 }
示例#54
0
 public PC(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard)
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
 }
 public Motherboard(IVideoCard videocard, IRamMemory ram)
 {
     this.VideoCard = videocard;
     this.Ram       = ram;
 }
示例#56
0
 public Laptop(IRam ram, ICpu cpu, IEnumerable<IHardDrive> drives, IVideoCard videoCard, IBattery battery)
     : base(ram, cpu, drives, videoCard)
 {
     this.Battery = battery;
 }
示例#57
0
 public GamingDesktop(ICpu cpu, IMotherBoard motherBoard, IVideoCard videoCard) : base(cpu, motherBoard, videoCard)
 {
 }
示例#58
0
 public Laptop(ICPU cpu, IRAM ram, IVideoCard videoCard, RAID hardDriveRaid, IMotherboard motherBoard, IBattery battery)
     : base(cpu, ram, videoCard, hardDriveRaid, motherBoard)
 {
     this.battery = battery;
 }
示例#59
0
 public OfficeDesktop(ICpu cpu, IMotherBoard motherBoard, IVideoCard videoCard) : base(cpu, motherBoard, videoCard)
 {
 }