public Laptop(string model,string manufacturer,string processor,byte ram,string graphicsCard, int hdd, string screen,string battery, Battery 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; }
static void Main(string[] args) { Laptop l1 = new Laptop("HP 250 G",699); Console.WriteLine(l1.ToString()); Battery life = new Battery(4.5); Laptop l2 = new Laptop("Lenovo Yoga 2 Pro", "Lenovo", "Intel Core i5-4210U (2-core, 1.70 - 2.70 GHz, 3MB cache)", 8, "Intel HD Graphics 4400", 128, "13.3\" (33.78 cm) – 3200 x 1800 (QHD+), IPS sensor display", "Li-Ion, 4-cells, 2550 mAh", life, 2259); Console.WriteLine(l2.ToString()); }