private void printSpecsBtn_Click(object sender, EventArgs e) { if(businessRbtn.Checked) { newMachine = new BusinessComputerFactory(); } else if(MultiRbtn.Checked) { newMachine = new MultimediaComputerFactory(); } else if(gmaeRbtn.Checked) { newMachine = new GamingComputerFactory(); } else { newMachine = new LaptopFactory(); } SpecPrinter currSpecPrinter = new SpecPrinter(newMachine, displaySpecBox); currSpecPrinter.printSpec(); }
private void printSpecsBtn_Click(object sender, EventArgs e) { if (businessRbtn.Checked) { newMachine = new BusinessComputerFactory(); } else if (MultiRbtn.Checked) { newMachine = new MultimediaComputerFactory(); } else if (gmaeRbtn.Checked) { newMachine = new GamingComputerFactory(); } else { newMachine = new LaptopFactory(); } SpecPrinter currSpecPrinter = new SpecPrinter(newMachine, displaySpecBox); currSpecPrinter.printSpec(); }