public static void Execute()
        {
            var vehicles = new List <Vehicle>
            {
                VehicleCreator.Create("Celta", VehicleSize.Small),
                VehicleCreator.Create("Jetta", VehicleSize.Medium),
                VehicleCreator.Create("BMW X6", VehicleSize.Big)
            };

            vehicles.ForEach(vehicle => AutoHelp.CreateAutoHelp(vehicle).PerformService());
        }
Exemplo n.º 2
0
        public static void Run()
        {
            var veiculosSocorro = new List <Vehicle>
            {
                VehicleCreator.Create("Celta", Size.Small),
                VehicleCreator.Create("Jetta", Size.Medium),
                VehicleCreator.Create("BMW X6", Size.Big)
            };

            veiculosSocorro.ForEach(v => SelfHelp.CreateSelfHelp(v).CarryOutService());
        }
Exemplo n.º 3
0
 public override Vehicle CreateVehicle(string model, Size size)
 {
     return(VehicleCreator.Create(model, size));
 }