static void Main(string[] args)
        {
            FabricaDeCarro fabrica = new FabricaFiat();
            CarroSedan sedan = fabrica.criarCarroSedan();
            CarroPopular popular = fabrica.criarCarroPopular();
            sedan.exibirInfoSedan();
            popular.exibirInfoPopular();

            fabrica = new FabricaFord();
            sedan = fabrica.criarCarroSedan();
            popular = fabrica.criarCarroPopular();
            sedan.exibirInfoSedan();
            popular.exibirInfoPopular();

            Console.ReadLine();
        }
示例#2
0
        static void Main(string[] args)
        {
            FabricaDeCarro fabrica = new FabricaFiat();
            CarroSedan     sedan   = fabrica.criarCarroSedan();
            CarroPopular   popular = fabrica.criarCarroPopular();

            sedan.exibirInfoSedan();
            popular.exibirInfoPopular();

            fabrica = new FabricaFord();
            sedan   = fabrica.criarCarroSedan();
            popular = fabrica.criarCarroPopular();
            sedan.exibirInfoSedan();
            popular.exibirInfoPopular();

            Console.ReadLine();
        }