public Yacht(string model, int weight, IBoatEngine engine, int cargoWeight)
     : base(model, weight)
 {
     this.Engine = engine;
     this.CargoWeight = cargoWeight;
     this.IsPowerBoat = true;
 }
Example #2
0
 public Yacht(string model, int weight, IBoatEngine engine, int cargoWeight)
 {
     this.CargoWeight = cargoWeight;
     this.Model = model;
     this.Weight = weight;
     this.Engine = engine;
 }
 public Yacht(string model, int weight, IBoatEngine engine, int cargoWeight)
     : base(model, weight)
 {
     this.Engine      = engine;
     this.CargoWeight = cargoWeight;
     this.IsPowerBoat = true;
 }
        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;
 }
Example #6
0
 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));
        }
Example #8
0
 public PowerBoat(string model, int weight, IBoatEngine firstEngine, IBoatEngine secondEngine)
     : base(model, weight)
 {
     this.FirstEngine  = firstEngine;
     this.SecondEngine = secondEngine;
 }
Example #9
0
 public static IBoat CreateBoat(string model, int weight, IBoatEngine boatEngine, int cargoWeight)
 {
     return(new Yacht(model, weight, boatEngine, cargoWeight));
 }
Example #10
0
 protected MotorBoat(string model, int weight, IBoatEngine boatEngine)
     : base(model, weight)
 {
     this.FirstBoatEngine = boatEngine;
 }
Example #11
0
 /// <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;
 }
Example #13
0
 public Yacht(string model, int weight, IBoatEngine boatEngine, int cargoWeight)
     : base(model, weight, boatEngine)
 {
     this.CargoWeight = cargoWeight;
 }
Example #14
0
 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;
 }
Example #17
0
 public Yacht(string model, int weight, int cargoWeight, IBoatEngine engine)
     : base(model, weight)
 {
     this.CargoWeight = cargoWeight;
     this.engine      = engine;
 }
Example #18
0
 public PowerBoat(string model, int weight, IBoatEngine firstEngined, IBoatEngine secondEngine) : base(model, weight)
 {
     this.BoatEngines = new[] { firstEngined, secondEngine };
 }