Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Monitor lgMonitor = new Monitor("1200x600", true, 32);
            Printer hpPrinter = new Printer("HP", "MP102", 50);

            Vga       nVdiaVga       = new Vga("Nvidia", 2054, 2054);
            Ram       samsungRam     = new Ram("DDR4", 5000, 5000);
            Processor intelProcessor = new Processor();

            intelProcessor.setCache(254);
            intelProcessor.setCore(8);
            intelProcessor.setSeries("Core i7 8th Gen");

            Computer computer = new
                                Computer.Builder(samsungRam, nVdiaVga, intelProcessor)
                                .withMonitor(lgMonitor)
                                .withPrinter(hpPrinter)
                                .build();

            Console.WriteLine(computer.ToString());


            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Monitor lgMonitor = new Monitor("1200x600", true, 32);
            Printer hpPrinter = new Printer("HP", "MP102", 50);

            Vga       nvdiaVga       = new Vga("Nvidia", 2054, 2054);
            Ram       samsungRam     = new Ram("DDR4", 5000, 8000);
            Processor intelprocessor = new Processor();

            intelprocessor.setCache(254);
            intelprocessor.setCore(8);
            intelprocessor.setSeries("Core i7 8th Gen");

            Computer computer = new Computer.Builder(samsungRam, nvdiaVga, intelprocessor).withMonitor(lgMonitor).withPrinter(hpPrinter).build();

            Console.WriteLine(computer.ToString());
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Monitor   SamsungMonitor = new Monitor("1200x600", true, 32);
            Printer   SonyPrinter    = new Printer("SONY", "MP102", 50);
            Vga       nvdiaVga       = new Vga("Nvidia RTX", 2070, 2080);
            Ram       AMD            = new Ram("DDR4", 2666, 4000);
            Processor intelProcessor = new Processor();

            intelProcessor.setCache(2000);
            intelProcessor.setCore(12);
            intelProcessor.setSeries("AMD RYZEN 7");

            Computer computer = new Computer.Builder(AMD, nvdiaVga, intelProcessor)
                                .withMonitor(SamsungMonitor).withPrinter(SonyPrinter).build();

            Console.WriteLine(computer.ToString());
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Monitor lgMonitor = new Monitor("1920x1080", true, 32);
            Printer hpPrinter = new Printer("HP", "MP102", 50);

            Vga       nvdiaVga       = new Vga("Nvidia", 2054, 2054);
            Ram       samsungRam     = new Ram("DDR4", 5000, 8000);
            Processor intelProcessor = new Processor();

            intelProcessor.setCache(254);
            intelProcessor.setCore(10);
            intelProcessor.setSeries("CORE i9 10th Gen");

            Computer computer = new
                                Computer.Builder(samsungRam, nvdiaVga, intelProcessor) //parameter wajib
                                .withMonitor(lgMonitor)                                //parameter opsional
                                .withPrinter(hpPrinter)                                //parameter opsional
                                .build();

            Console.WriteLine(computer.ToString());
        }