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