public void FuelEnginedVehicle(string i_LicenseNumberOfVehicle, EnginedVehicle.eFuelType i_FuelType, float i_AmountOfFuelToAdd) { // this method get license number , fuel type and amount of fuel to add and refueling the vehicle Vehicle vehicleToFuel; vehicleToFuel = m_Customers[i_LicenseNumberOfVehicle.GetHashCode()].Vehicle; (vehicleToFuel as EnginedVehicle).Refuel(i_AmountOfFuelToAdd, i_FuelType); }
public bool areFuelTypesEquals(string i_LicenseNumberOfVehicle, EnginedVehicle.eFuelType fuelType) { // this method get a license number and a fuel type and return true if the fuel types are the same. bool isFuelEquals; if ((m_Customers[i_LicenseNumberOfVehicle.GetHashCode()].Vehicle as EnginedVehicle).FuelType == fuelType) { isFuelEquals = true; } else { isFuelEquals = false; } return(isFuelEquals); }