private Vehicle addElectricCar(string i_LicenseNumber, string i_Model, string i_ManufacturerName, float i_MaxAirPressure) { string electricCarData = @"Please enter the following additional information: 1. Car color (Grey,Blue,White,Black) 2. numberOfDoors(Two,Three,Four,Five)"; Console.WriteLine(electricCarData); Car.eColor color = (Car.eColor)Enum.Parse(typeof(Car.eColor), Console.ReadLine()); Car.eNumOfDoors numberOfDoors = (Car.eNumOfDoors)Enum.Parse(typeof(Car.eNumOfDoors), Console.ReadLine()); return(MakeVehicle.MakeElectricCar(i_Model, i_LicenseNumber, i_ManufacturerName, i_MaxAirPressure, color, numberOfDoors)); }
private Vehicle addTruck(string i_LicenseNumber, string i_Model, string i_ManufacturerName, float i_MaxAirPressure) { string truckData = @"Please enter the following additional information: 1. Trunk is open (True,False) 2. Capacity of the trunk"; Console.WriteLine(truckData); bool i_TrunkOpen = bool.Parse(Console.ReadLine()); float i_CapacityTrunk = float.Parse(Console.ReadLine()); return(MakeVehicle.MakeTruck(i_Model, i_LicenseNumber, i_ManufacturerName, i_MaxAirPressure, i_TrunkOpen, i_CapacityTrunk)); }
private Vehicle addElectricMotorCycle(string i_LicenseNumber, string i_Model, string i_ManufacturerName, float i_MaxAirPressure) { string electricMotorCycleData = @"Please enter the following additional information: 1. LicenseType (A,A1,B1,B2) 2. Engine volume"; Console.WriteLine(electricMotorCycleData); MotorCycle.eLicenseType licenseType = (MotorCycle.eLicenseType)Enum.Parse(typeof(MotorCycle.eLicenseType), Console.ReadLine()); int engineVolume = int.Parse(Console.ReadLine()); return(MakeVehicle.MakeElectricMotorCycle(i_Model, i_LicenseNumber, i_ManufacturerName, i_MaxAirPressure, licenseType, engineVolume)); }