Beispiel #1
0
        static void Main(string[] args)
        {
            MotherBoard board     = new MotherBoard();
            var         firstProc = new Processor {
                Name = "Intel Core i9"
            };
            var secondProc = new Processor {
                Name = "Intel Core i7"
            };

            var firstPC = new Computer {
                Name = "Hp Pavillion 9", Price = 1400, MotherBoard = board, Processor = firstProc
            };
            var secondPC = new Computer {
                Name = "iMac Pro", Price = 2000, MotherBoard = board, Processor = secondProc
            };

            firstPC.GetInfo();
            secondPC.GetInfo();
            Console.Read();
        }
Beispiel #2
0
 public void GetInfo()
 {
     Console.WriteLine($"PC: {Name}\nPrice:{Price}$");
     MotherBoard.GetProcInfo(Processor);
 }