Пример #1
0
        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");
        }
Пример #2
0
 public GPU createGPU()
 {
     return gpu = new MultimediaGPU();
 }
Пример #3
0
 public GPU createGPU()
 {
     return gpu = new GamingGPU();
 }
Пример #4
0
 public GPU createGPU()
 {
     return gpu = new BusinessGPU();
 }
Пример #5
0
 public GPU createGPU()
 {
     return(gpu = new MultimediaGPU());
 }
Пример #6
0
 public GPU createGPU()
 {
     return(gpu = new BusinessGPU());
 }
Пример #7
0
 public GPU createGPU()
 {
     return(gpu = new GamingGPU());
 }