public Yacht(string model, int weight, IBoatEngine engine, int cargoWeight) : base(model, weight) { this.Engine = engine; this.CargoWeight = cargoWeight; this.IsPowerBoat = true; }
public Yacht(string model, int weight, IBoatEngine engine, int cargoWeight) { this.CargoWeight = cargoWeight; this.Model = model; this.Weight = weight; this.Engine = engine; }
public string CreateYacht(string model, int weight, string engineModel, int cargoWeight) { IBoatEngine engine = this.Database.Engines.GetItem(engineModel); IBoat boat = new Yacht(model, weight, cargoWeight, engine); this.Database.Boats.Add(boat); return(string.Format("Yacht with model {0} registered successfully.", model)); }
public PowerBoat(string model, int weight, IBoatEngine firstEngine, IBoatEngine secondEngine) : base(model, weight) { this.Engines = new List <IBoatEngine> { firstEngine, secondEngine }; this.IsPowerBoat = true; }
public static IBoat CreateBoat( string model, int weight, IBoatEngine firstBoatEngine, IBoatEngine secondBoatEngine) { return(new PowerBoat(model, weight, firstBoatEngine, secondBoatEngine)); }
public string CreatePowerBoat(string model, int weight, string firstEngineModel, string secondEngineModel) { IBoatEngine firstEngine = this.Database.Engines.GetItem(firstEngineModel); IBoatEngine secondEngine = this.Database.Engines.GetItem(secondEngineModel); IBoat boat = new PowerBoat(model, weight, firstEngine, secondEngine); this.Database.Boats.Add(boat); return(string.Format("Power boat with model {0} registered successfully.", model)); }
public PowerBoat(string model, int weight, IBoatEngine firstEngine, IBoatEngine secondEngine) : base(model, weight) { this.FirstEngine = firstEngine; this.SecondEngine = secondEngine; }
public static IBoat CreateBoat(string model, int weight, IBoatEngine boatEngine, int cargoWeight) { return(new Yacht(model, weight, boatEngine, cargoWeight)); }
protected MotorBoat(string model, int weight, IBoatEngine boatEngine) : base(model, weight) { this.FirstBoatEngine = boatEngine; }
/// <inheritdoc /> /// <summary> /// Initialize a new instance of <see cref="PowerBoat"/> class. /// </summary> /// <param name="model">The model.</param> /// <param name="weight">The weight.</param> /// <param name="engine">The first engine.</param> /// <param name="secondEngine">The second engine.</param> public PowerBoat(string model, int weight, IBoatEngine engine, IBoatEngine secondEngine) : base(model, weight, engine) { this.SecondEngine = secondEngine; }
public Yacht(string model, int weight, IBoatEngine boatEngine, int cargoWeight) : base(model, weight, boatEngine) { this.CargoWeight = cargoWeight; }
protected MotorBoat(string model, int weight, IBoatEngine engine) : base(model, weight) { this.Engine = engine; }
protected MotorBoat(string model, int weight, IBoatEngine boatEngine) : base(model, weight) { this.Engine = boatEngine; }
public PowerBoat(string model, int weight, IBoatEngine firstEngine, IBoatEngine secondEngine) : base(model, weight) { this.Engines = new List<IBoatEngine> { firstEngine, secondEngine }; this.IsPowerBoat = true; }
public Yacht(string model, int weight, int cargoWeight, IBoatEngine engine) : base(model, weight) { this.CargoWeight = cargoWeight; this.engine = engine; }
public PowerBoat(string model, int weight, IBoatEngine firstEngined, IBoatEngine secondEngine) : base(model, weight) { this.BoatEngines = new[] { firstEngined, secondEngine }; }