Exemplo n.º 1
0
        public static void Main()
        {
            var shop = new Director_Shop();

            var childBuilder = new childBuilder();
            var adultBuilder = new AdultBuilder();

            shop.Construct(childBuilder);
            var childPackage = childBuilder.GetResult();

            childPackage.Show("child");

            shop.Construct(adultBuilder);
            var adultPackage = adultBuilder.GetResult();

            adultPackage.Show("adult");
        }
Exemplo n.º 2
0
        public static void Main()
        {
            var shop = new Director_Shop();

            var childBuilder = new childBuilder();
            var adultBuilder = new AdultBuilder();

            shop.Construct(childBuilder);
            Product childPackage = childBuilder.GetResult();

            Console.WriteLine("ChildPackage");
            childPackage.Show();

            Console.WriteLine("AdultPackage");
            shop.Construct(adultBuilder);
            Product adultPackage = adultBuilder.GetResult();

            adultPackage.Show();

            Console.ReadLine();
        }