public Car(string i_ModelName, string i_LicenseNumber, EnrgeyVehicles i_EnrgeyType, float i_RemainingEnergy, string i_ManufacturerName, float i_CurrentAirPressure, ColorCars i_colorCar, DoorNumbers i_DoorNumber) : base(i_ModelName, i_LicenseNumber, i_RemainingEnergy) { m_EnrgeyType = i_EnrgeyType; m_colorCar = i_colorCar; m_DoorNumber = i_DoorNumber; CreatWheels(4, i_ManufacturerName, i_CurrentAirPressure, 31); if (i_EnrgeyType is ElectricVehicles) { m_EnrgeyType.CreatEnrgey(i_RemainingEnergy, 1.8f); } else { m_EnrgeyType.CreatEnrgey(i_RemainingEnergy, 55f); ((FuelVehicles)m_EnrgeyType).FuelType = FuelTypes.Octan96; } }
public Vehicles CreateVehicle(string registrationNumber, string modelCar, VehicleTypes vehicleType, ColorCars color, bool isSail, bool isInterCity, bool isCross, int nrMotors) { Vehicles newVehicle = null; switch (vehicleType) { case VehicleTypes.Car: newVehicle = new Car(registrationNumber, modelCar, color, 0); break; case VehicleTypes.Motorcycle: newVehicle = new Motorcycle(registrationNumber, modelCar, 0, isCross); break; case VehicleTypes.Plane: newVehicle = new Plane(registrationNumber, modelCar, color, 0, nrMotors); break; case VehicleTypes.Boat: newVehicle = new Boat(registrationNumber, modelCar, color, 0, isSail); break; case VehicleTypes.Bus: newVehicle = new Bus(registrationNumber, modelCar, color, 0, isInterCity); break; } return(newVehicle); }
public Car(string registrationNumber, string modelCar, ColorCars colorcar, int wheels) : base(registrationNumber, modelCar, wheels) { Colorcar = colorcar; }
public Car(ColorCars colorCar, int actualSpeed) { this.colorCar = colorCar; this.actualSpeed = actualSpeed; }
public int actualSpeed; // Aanmaken globale variabele van het type int #endregion #region Constructor(s) public Car() // Standaard Parameterloze Constructor { actualSpeed = 0; colorCar = ColorCars.Groen; }
public Plane(string registrationNumber, string modelCar, ColorCars color, int wheels, int nrMotors) : base(registrationNumber, modelCar, wheels) { NrMotors = nrMotors; }
public Bus(string registrationNumber, string modelCar, ColorCars color, int wheels, bool isInterCity) : base(registrationNumber, modelCar, wheels) { IsInterCity = isInterCity; }
public Boat(string registrationNumber, string modelCar, ColorCars color, int wheels, bool isSail) : base(registrationNumber, modelCar, wheels) { IsSail = isSail; }