Exemplo n.º 1
0
            /// <summary>
            /// Entry point into console application.
            /// </summary>
            public static void Main222()
            {
                prodA obja  = new prodA();
                var   obja1 = new productclass();

                // obja1 = obja;
                obja.print();
                obja1.print();
                VehicleBuilder builder;

                // Create shop with vehicle builders
                Shop shop = new Shop();

                // Construct and display vehicles
                builder = new ScooterBuilder();
                shop.Construct(builder);
                builder.Vehicle.Show();

                builder = new CarBuilder();
                shop.Construct(builder);
                builder.Vehicle.Show();

                builder = new MotorCycleBuilder();
                shop.Construct(builder);
                builder.Vehicle.Show();

                // Wait for user
                Console.ReadKey();
            }
Exemplo n.º 2
0
            /// <summary>
            /// Entry point into console application.
            /// </summary>
            public static void Main222()
            {
                prodA obja = new prodA();
                   var  obja1 = new productclass();
                  // obja1 = obja;
                obja.print();
                obja1.print();
                VehicleBuilder builder;

                // Create shop with vehicle builders
                Shop shop = new Shop();

                // Construct and display vehicles
                builder = new ScooterBuilder();
                shop.Construct(builder);
                builder.Vehicle.Show();

                builder = new CarBuilder();
                shop.Construct(builder);
                builder.Vehicle.Show();

                builder = new MotorCycleBuilder();
                shop.Construct(builder);
                builder.Vehicle.Show();

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