public MotorBoat(BoatData boatData) : base(boatData) { if (boatData.Prefix != CodePrefix) { throw new InvalidCastException("The prefix doesn't match this type."); } HorsePower = boatData.Characteristic; }
public RowingBoat(BoatData boatData) : base(boatData) { if (boatData.Prefix != CodePrefix) { throw new InvalidCastException("The prefix doesn't match this type."); } MaxPassengers = boatData.Characteristic; }
public Catamaran(BoatData boatData) : base(boatData) { if (boatData.Prefix != CodePrefix) { throw new InvalidCastException("The prefix doesn't match this type."); } BedCount = boatData.Characteristic; }
private void AddBoat(BoatData boatData, int index, int berthedFor = 0) { var boat = Boat.FromData(boatData); AddBoat(boat, index, berthedFor); }
protected Boat(BoatData boatData) { Weight = boatData.Weight; TopSpeed = boatData.TopSpeed; Code = boatData.Code; }