public void print() { CPU currentCPU = componentsFactory.createCPU(); GPU currentGPU = componentsFactory.createGPU(); RAM currentRAM = componentsFactory.createRAM(); Monitor currentMonitory = componentsFactory.createMonitor(); double totalPrice = currentCPU.Price + currentGPU.Price + currentRAM.Price + currentMonitory.Price; displayBox.Clear(); displayBox.AppendText("Price\tComponent\n"); displayBox.AppendText("-----------------------------------------------------------------------------------------------\n"); displayBox.AppendText(currentCPU.ToString() + "\n"); displayBox.AppendText(currentGPU.ToString() + "\n"); displayBox.AppendText(currentRAM.ToString() + "\n"); displayBox.AppendText(currentMonitory.ToString() + "\n"); displayBox.AppendText("-----------------------------------------------------------------------------------------------\n"); displayBox.AppendText(totalPrice.ToString() + "\tTotal Cost"); }
public GPU createGPU() { return gpu = new MultimediaGPU(); }
public GPU createGPU() { return gpu = new GamingGPU(); }
public GPU createGPU() { return gpu = new BusinessGPU(); }
public GPU createGPU() { return(gpu = new MultimediaGPU()); }
public GPU createGPU() { return(gpu = new BusinessGPU()); }
public GPU createGPU() { return(gpu = new GamingGPU()); }