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()); }
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()); }
public override Vehicle CreateVehicle(string model, Size size) { return(VehicleCreator.Create(model, size)); }