Пример #1
0
        static void Main(string[] args)
        {
            CoffeeBuilder builder;
            //create coffee with coffeebuilder
            Coffee coffee = new Coffee();

            //construct the coffees
            builder = new EspressoBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new MacchiatoBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new RistrettoBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new MochaBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new IrishBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new FrappeBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new LatteBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new GlaceBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new AmericanoBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();

            builder = new CappuccinoBuilder();
            coffee.Construct(builder);
            builder.Coffee.Show();


            //wait for user
            Console.ReadKey();
        }