//Method public void printSpec() { CPU currCPU = machineMaker.makeCPU(); Memory currMemory = machineMaker.makeMemory(); GPU currGPU = machineMaker.makeGPU(); double totalPrice = currCPU.Price + currGPU.Price + currMemory.Price; displayBox.Items.Clear(); displayBox.Items.Add("Price\tComponent"); displayBox.Items.Add("*********************************"); displayBox.Items.Add(currCPU.ToString()); displayBox.Items.Add(currGPU.ToString()); displayBox.Items.Add(currMemory.ToString()); displayBox.Items.Add("*********************************"); displayBox.Items.Add("Total Price: " + totalPrice.ToString()); }
public void printSpec() { CPU currentCPU = machineMaker.makeCPU(); Memory currentMemory = machineMaker.makeMemory(); GraphicsCard currentGraphicsCard = machineMaker.makeGraphicsCard(); Monitor currentMonitor = machineMaker.makeMonitor(); double totalPrice = currentCPU.Price + currentMemory.Price + currentGraphicsCard.Price; listbox.Items.Clear(); listbox.Items.Add("Price\tComponent"); listbox.Items.Add("-----------------------------"); listbox.Items.Add(currentCPU.Price + "\t" + currentCPU.ToString()); listbox.Items.Add(currentMemory.Price + "\t" + currentMemory.ToString()); listbox.Items.Add(currentGraphicsCard.Price + "\t" + currentGraphicsCard.ToString()); listbox.Items.Add(currentMonitor.Price + "\t" + currentMonitor.ToString()); listbox.Items.Add("-----------------------------"); listbox.Items.Add("Total Price: " + totalPrice.ToString()); }