Ejemplo n.º 1
0
        static void BuildConsoleWriteLines(string computerType, IComputerBuilder builder)
        {
            ComputerDirector director = new ComputerDirector(builder);
            Computer         computer = director.construct();

            Console.WriteLine($"{computerType}: Os={builder.Os} Graphics Card={builder.GraphicsCard} Cpu={builder.Cpu} Ram={builder.Ram} Storage={builder.Storage}");
        }
Ejemplo n.º 2
0
        public ComputerClient()
        {
            var director = new ComputerDirector(new BuildComputer());

            director.CreateComputer();
            var computer = director.GetComputer();

            computer.showInfo();
        }