public Motorcycle( string i_ModelName, string i_LicenseNumber, Wheel i_Wheel, int i_NumOfWheels, eVehicleStatus i_eStatus, PowerSource i_PowerSource, eLicencseType i_LicenseType, int i_EngineCapacity) : base(i_ModelName, i_LicenseNumber, i_Wheel, i_NumOfWheels, i_eStatus, i_PowerSource) { this.m_LicenseType = i_LicenseType; this.r_EngineCapacity = i_EngineCapacity; }
public ComposedVehicle CreateMotorcycle( eValidVehicle i_eValidVehicle, string i_OwnerName, string i_OwnerPhoneNumber, string i_LicenseNumber, string i_ModelName, string i_WheelManufacturer, float i_WheelPressure, float i_CurrentPower, eLicencseType i_eLicenseType, int i_EngineCapacity) { Vehicle vehicle; ComposedVehicle composedVehicle; if (i_eValidVehicle == eValidVehicle.RegMotorCycle) { vehicle = VehicleFactory.CreateMotorcycle( i_ModelName, i_LicenseNumber, i_WheelManufacturer, i_WheelPressure, i_CurrentPower, i_eLicenseType, i_EngineCapacity); } else { vehicle = VehicleFactory.CreateElectricMotorcycle( i_ModelName, i_LicenseNumber, i_WheelManufacturer, i_WheelPressure, i_CurrentPower, i_eLicenseType, i_EngineCapacity); } composedVehicle = new ComposedVehicle(vehicle, i_OwnerName, i_OwnerPhoneNumber); return(composedVehicle); }
public static Vehicle CreateMotorcycle( string i_ModelName, string i_LicenseNumber, string i_WheelManufacturer, float i_CurrentAirPressure, float i_CurrentPower, eLicencseType i_eLicenseType, int i_EngineCapacity) { Vehicle fueledMotorcycle = new Motorcycle( i_ModelName, i_LicenseNumber, new Wheel(i_WheelManufacturer, 28, i_CurrentAirPressure), 2, eVehicleStatus.OnRepair, new FuelSource(5, i_CurrentPower, eFuelType.Octan95), i_eLicenseType, i_EngineCapacity); return(fueledMotorcycle); }
public static Vehicle CreateElectricMotorcycle( string i_ModelName, string i_LicenseNumber, string i_WheelManufacturer, float i_CurrentAirPressure, float i_CurrentPower, eLicencseType i_eLicenseType, int i_EngineCapacity) { Vehicle electricMotorcycle = new Motorcycle( i_ModelName, i_LicenseNumber, new Wheel(i_WheelManufacturer, 28, i_CurrentAirPressure), 2, eVehicleStatus.OnRepair, new ElectricalSource(3.2f, i_CurrentPower), i_eLicenseType, i_EngineCapacity); return(electricMotorcycle); }