Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            IFactory vFactory = new VankeFactory();
            IFactory sFactory = new SohoFactory();

            IVilla     vVilla     = vFactory.ProduceVilla();
            IApartment vApartment = vFactory.ProduceApartment();

            IVilla     sVilla     = sFactory.ProduceVilla();
            IApartment sApartment = sFactory.ProduceApartment();

            vVilla.Show();
            vApartment.Show();

            sVilla.Show();
            sApartment.Show();

            Console.ReadLine();
        }
Exemplo n.º 2
0
        private static void Main(string[] args)
        {
            IFactory vFactory = new VankeFactory();
            IFactory sFactory = new SohoFactory();

            IVilla vVilla = vFactory.ProduceVilla();
            IApartment vApartment = vFactory.ProduceApartment();

            IVilla sVilla = sFactory.ProduceVilla();
            IApartment sApartment = sFactory.ProduceApartment();

            vVilla.Show();
            vApartment.Show();

            sVilla.Show();
            sApartment.Show();

            Console.ReadLine();
        }