public Laptop(string model, decimal price, Battery battery) : this(model,price) { this.Model = model; this.Price = price; this.Battery = battery; }
public Laptop(string model, double price, Battery battery, string manufact = null, string processor = null, int ram = 0, string graphicsCard = null, string hdd = null, string screen = null) : this(model, price, battery, manufact) { this.Processor = processor; this.Ram = ram; this.GraphicsCard = graphicsCard; this.Hdd = hdd; this.Screen = screen; }
public Laptop(string model, string manufacturer, string processor, string ram, string graphicsCard, string hdd, string screen,Battery battery, decimal price) : this(model,price) { this.Manufacturer = manufacturer; this.Processor = processor; this.RAM = ram; this.HDD = hdd; this.GraphicsCard = graphicsCard; this.Battery = battery; this.Screen = screen; }
public Laptop(string model, decimal price, string manufacturer, string screen, string processor, string ram, string hdd, string graphicsCard, Battery battery) { this.Model = model; this.Price = price; this.Manufacturer = manufacturer; this.Processor = processor; this.Ram = ram; this.GraphicsCard = graphicsCard; this.Hdd = hdd; this.Screen = screen; this.Battery = battery; }
public Laptop(string model, decimal price, string maker, string cpu, int? ram, string vga, string hdd, string screen, string batteryName, double? batteryLife) { this.Model = model; this.Price = price; this.Maker = maker; this.CPU = cpu; this.RAM = ram; this.VGA = vga; this.HDD = hdd; this.Screen = screen; this.battery = new Battery(batteryName, batteryLife); }
// Constructors. public Laptop(string model, string brand, string processor, string memory, string graphics, string hddDrive, string screen, Battery battery, double price) { this.Model = model; this.Brand = brand; this.CPU = processor; this.RAM = memory; this.GPU = graphics; this.HDD = hddDrive; this.Screen = screen; this.Battery = battery; this.Price = price; }
public Laptop(string model, decimal price, string manufacturer = null, string processor = null, int? ram = null, string graphicCard = null, int? hdd = null, string screen = null, string batteryType = null, double? batteryLife = null) { this.Model = model; this.Price = price; this.Manufacturer = manufacturer; this.Processor = processor; this.Ram = ram; this.GraphicCard = graphicCard; this.Hdd = hdd; this.Screen = screen; this.battery = new Battery(batteryType, batteryLife); }
static void Main(string[] args) { Battery first = new Battery("Li-Ion, 4-cells, 2550 mAh", 4.5); Laptop fullInfo = new Laptop("Lenovo Yoga 2 Pro", "Lenovo", "Intel Core i5-4210U (2-core, 1.70 - 2.70 GHz, 3MB cache)", "8 GB", "Intel HD Graphics 4400", "128GB SSD", "\"13.3\"(33.78 cm) – 3200 x 1800(QHD +), IPS sensor display",first, 2259.00m); Laptop sampleInfo = new Laptop("HP 250 G2", 699.0m); Console.WriteLine("Full info: \n"+fullInfo.ToString()); Console.WriteLine(); Console.WriteLine("Sample info: \n"+sampleInfo.ToString()); }
public Laptop(string model, decimal price, string manufacturer = null, string processor = null, string ram = null, string hdd = null, string graphics = null, Battery battery = null, string screen = null) : this(model, price) { this.Manufacturer = manufacturer; this.Processor = processor; this.Ram = ram; this.HDD = hdd; this.Graphics = graphics; this.Battery = battery; this.Screen = screen; }
public Laptop(string model, string manufacturer, string processor, string RAM, string graphicsCard, string HDD, string screen, Battery batteryType, double batteryLife, decimal price) { this.Model = model; this.Manufacturer = manufacturer; this.Processor = processor; this.Ram = ram; this.GraphicsCard = graphicsCard; this.Hdd = hdd; this.Screen = screen; this.BatteryLife = batteryLife; this.BatteryType = batteryType; this.Price = price; }
static void Main(string[] args) { Battery battery = new Battery("Li-Ion", 4, 2550, 4.5); Laptop hpPC = new Laptop("HP 250 G2", 699.00); Laptop lenovoPC = new Laptop("Lenovo Yoga Pro 2", "Lenovo", "Intel Core i5-4210U (2-core, 1.70 - 2.70 GHz, 3MB cache)", "8 GB", "Intel HD Graphics 4400", "128GB SSD", "13.3\"(33.78 cm) – 3200 x 1800(QHD +), IPS sensor display", battery, 2259.00); Console.WriteLine(hpPC.ToString()); Console.WriteLine(lenovoPC.ToString()); }
public LaptopShop(string model, string screen, Battery battery, double batteryLife, double price) : this(model, null, null, 0, null, 0, screen, null, 0, price) { }
public LaptopShop(string model, string manufacturer, string processor, int ram, string graphicsCard, int hdd, string screen, Battery battery, double batteryLife, double price) { this.Model = model; this.Manufacturer = manufacturer; this.Processor = processor; this.Ram = ram; this.GraphicsCard = graphicsCard; this.Hdd = hdd; this.Screen = screen; this.Battery = battery; this.BatteryLife = batteryLife; this.Price = price; }
public Laptop(string model, double price, Battery battery, string manufact) : this(model, price) { this.batt = battery; this.Manufact = manufacturer; }
public Laptop(string model, string manufacturer, string processor, string ram, string graphicsCard, string hdd, string screen, Battery battery, decimal price) : this(model, price) { this.Manufacturer = manufacturer; this.Processor = processor; this.RAM = ram; this.HDD = hdd; this.GraphicsCard = graphicsCard; this.Battery = battery; this.Screen = screen; }
public Laptop(string model , string screen,Battery battery,double batteryLife,decimal price) : this(model,null,null,null,null,null,screen,battery,batteryLife,price) { }
public void AddBattery(Battery battery) { this.batt = battery; }