Ejemplo n.º 1
0
        static void AbstractFactory()
        {
            WoodenDoorFactory woodenDoorFactory = new WoodenDoorFactory();

            var door   = woodenDoorFactory.makeDoor();
            var expert = woodenDoorFactory.makeFittingExpert();

            door.getDescription();
            expert.getDescription();



            IronDoorFactory ironDoorFactory = new IronDoorFactory();

            var door2   = ironDoorFactory.makeDoor();
            var expert2 = ironDoorFactory.makeFittingExpert();

            door2.getDescription();
            expert2.getDescription();
        }
Ejemplo n.º 2
0
 public static void ImplementAbstractFactory()
 {
     WoodenDoorFactory woodenFactory = new WoodenDoorFactory();
     var door   = woodenFactory.makeDoor();
     var expert = woodenFactory.makeFittingExpert();
 }