Exemple #1
0
        static void Main(string[] args)
        {
            ComputerFactory factory = new ComputerFactory();

            Console.WriteLine("WORK: " + factory.createComputer("work"));
            Console.WriteLine("GAME: " + factory.createComputer("game"));
            Console.WriteLine("LIVING ROOM: " + factory.createComputer("living room"));
        }
        static void Main(string[] args)
        {
            ComputerFactory myFactory = new ComputerFactory();

            Console.WriteLine("Game: " + myFactory.ProduceComputer("Games"));
            Console.WriteLine("Work: " + myFactory.ProduceComputer("Work"));
            Console.WriteLine("Living room: " + myFactory.ProduceComputer("LivingRoom"));
        }