Esempio n. 1
0
        public override IBicycle Build(BikeBuilder builder)
        {
            builder.BuildHandleBars();
            builder.BuildWideTires();

            return(builder.Bicycle);
        }
        public override IBicycle Build(BikeBuilder builder)
        {
            builder.BuildHandleBars();
            builder.BuildStreetTires();

            return builder.Bicycle;
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Engineer director = new Engineer();

            Builder b1 = new BikeBuilder();

            director.Construct(b1);
            VehicleFormed p1 = b1.GetVehicle();

            p1.Show();

            Builder b2 = new CarBuilder();

            director.Construct(b2);
            VehicleFormed p2 = b2.GetVehicle();

            p2.Show();


            Console.ReadKey();
        }
Esempio n. 4
0
 //paramater of a method(BikeBuilder builder)
 //object type + variable name for this type
 // like int          value
 // build name for method
 //public =access modifier
 //abstarct= requires child classes to implement
 //IBicycle = returntype of the method
 public abstract IBicycle Build(BikeBuilder builder);