Exemple #1
0
 public virtual IVehicle CreateBoxVan()
 {
     if (boxVan == null)
     {
         boxVan = new BoxVan(new StandardEngine(1300));
     }
     return((IVehicle)boxVan.Clone());
 }
Exemple #2
0
 public VehicleManager()
 {
     saloon = new Saloon(new StandardEngine(1300));
     coupe  = new Coupe(new StandardEngine(1300));
     sport  = new Sport(new StandardEngine(1300));
     boxVan = new BoxVan(new StandardEngine(1300));
     pickup = new PickUp(new StandardEngine(1300));
 }