コード例 #1
0
 /// <summary>
 /// This Class make instance of new motherboard.
 /// </summary>
 /// <param name="cpuElement">CPU element on mootherboard.</param>
 /// <param name="ramElement">RAM element on motherboard.</param>
 /// <param name="hardDriveElement">Hard drive on mothervboard.</param>
 /// <param name="videoCardElement">Video card on motherboard.</param>
 public Motherboard(CPU cpuElement, RAM ramElement, HardDrive hardDriveElement, VideoCard videoCardElement)
 {
     this.CPUElement = cpuElement;
     this.RAMElement = ramElement;
     this.HardDriveElement = hardDriveElement;
     this.VideoCardElement = videoCardElement;
 }
コード例 #2
0
 public Server(
     CPU cpuOfComputer, 
     RAM ramOfComputer, 
     HardDrive hardDriveOfComputer,
     VideoCard videoCardOfComputer)
     : base(ComputerType.PC, cpuOfComputer, ramOfComputer, hardDriveOfComputer, videoCardOfComputer, null)
 {
     this.motherboard = 
         new Motherboard(this.CpuOfComputer, this.RamOfComputer, this.HardDriveOfComputer, this.VideoCardOfComputer);
 }
コード例 #3
0
        public override PersonalComputer MakePersonalComputer()
        {
            CPU cpu = new CPU(2, 64);
            RAM ram = new RAM(4);
            HardDrive hardDrive = new HardDrive(2000, false, 0);
            VideoCard videoCard = new VideoCard(true);

            PersonalComputer lenovoPersonalComputer = new PersonalComputer(cpu, ram, hardDrive, videoCard);

            return lenovoPersonalComputer;
        }
コード例 #4
0
        public override Server MakeServer()
        {
            CPU cpu = new CPU(2, 128);
            RAM ram = new RAM(8);
            HardDrive hardDrive = new HardDrive(500, true, 2);
            VideoCard videoCard = new VideoCard(true);

            Server lenovoServer = new Server(cpu, ram, hardDrive, videoCard);

            return lenovoServer;
        }
コード例 #5
0
        public override PersonalComputer MakePersonalComputer()
        {
            CPU cpu = new CPU(2, 32);
            RAM ram = new RAM(2);
            HardDrive hardDrive = new HardDrive(500, false, 0);
            VideoCard videoCard = new VideoCard(false);

            PersonalComputer hpPersonalComputer = new PersonalComputer(cpu, ram, hardDrive, videoCard);

            return hpPersonalComputer;
        }
コード例 #6
0
        public override Server MakeServer()
        {
            CPU cpu = new CPU(4, 32);
            RAM ram = new RAM(32);
            HardDrive hardDrive = new HardDrive(1000, true, 2);
            VideoCard videoCard = new VideoCard(true);

            Server hpServer = new Server(cpu, ram, hardDrive, videoCard);

            return hpServer;
        }
コード例 #7
0
 public Laptop(
     CPU cpuOfComputer, 
     RAM ramOfComputer, 
     HardDrive hardDriveOfComputer, 
     VideoCard videoCardOfComputer, 
     Battery laptopBattery)
     : base(ComputerType.PC, cpuOfComputer, ramOfComputer, hardDriveOfComputer, videoCardOfComputer, laptopBattery)
 {
     this.motherboard = 
         new Motherboard(this.CpuOfComputer, this.RamOfComputer, this.HardDriveOfComputer, this.VideoCardOfComputer);
 }
コード例 #8
0
        public override PersonalComputer MakePersonalComputer()
        {
            CPU cpu = new CPU(4, 64);
            RAM ram = new RAM(8);
            HardDrive hardDrive = new HardDrive(1000, false, 0);
            VideoCard videoCard = new VideoCard(false);

            PersonalComputer dellPersonalComputer = new PersonalComputer(cpu, ram, hardDrive, videoCard);

            return dellPersonalComputer;
        }
コード例 #9
0
        public override Server MakeServer()
        {
            CPU cpu = new CPU(8, 64);
            RAM ram = new RAM(64);
            HardDrive hardDrive = new HardDrive(2000, true, 2);
            VideoCard videoCard = new VideoCard(true);

            Server dellServer = new Server(cpu, ram, hardDrive, videoCard);

            return dellServer;
        }
コード例 #10
0
        public override Laptop MakeLaptop()
        {
            CPU cpu = new CPU(2, 64);
            RAM ram = new RAM(16);
            HardDrive hardDrive = new HardDrive(1000, false, 0);
            VideoCard videoCard = new VideoCard(false);
            Battery battery = new Battery();

            Laptop lenovoLaptop = new Laptop(cpu, ram, hardDrive, videoCard, battery);

            return lenovoLaptop;
        }
コード例 #11
0
        public override Laptop MakeLaptop()
        {
            CPU cpu = new CPU(4, 32);
            RAM ram = new RAM(8);
            HardDrive hardDrive = new HardDrive(1000, false, 0);
            VideoCard videoCard = new VideoCard(false);
            Battery battery = new Battery();

            Laptop dellLaptop = new Laptop(cpu, ram, hardDrive, videoCard, battery);

            return dellLaptop;
        }
コード例 #12
0
 public Computer(
     ComputerType typeOfComputer, 
     CPU cpuOfComputer, 
     RAM ramOfComputer, 
     HardDrive hardDriveOfComputer, 
     VideoCard videoCardOfComputer, 
     Battery laptopBattery)
 {
     this.TypeOfComputer = typeOfComputer;
     this.CpuOfComputer = cpuOfComputer;
     this.RamOfComputer = ramOfComputer;
     this.HardDriveOfComputer = hardDriveOfComputer;
     this.VideoCardOfComputer = videoCardOfComputer;
     this.LaptopBattery = laptopBattery;
 }