/// <summary> /// Print output /// </summary> /// <returns></returns> public override string Print() { return(string.Format("Reg.ID={0}, Make={1}, Model={2}, MaxPassengers={3}, NoOfWheeels={4}, Efficiancy={5}", string.Empty.PadLeft(4, '0'), Make != null ? Make.Name.ToString().PadLeft(5, ' ') : string.Empty.ToString().PadLeft(8, ' '), BicycleModel != null ? BicycleModel.Name.ToString().PadLeft(15, ' ') : string.Empty.ToString().PadLeft(8, ' '), MaxPassengers.ToString().PadLeft(2, '0'), NoOfWheeels.ToString().PadLeft(2, '0'), CalculateFuelEfficiancy().ToString().PadLeft(2, '0'))); }
/// <summary> /// Print output /// </summary> /// <returns></returns> public override string Print() { return(string.Format("RegistrationID={0}, Make={1}, Model={2}, MaxPassengers={3}, NoOfWheeels={4}, Milage={5}", RegistrationID.ToString().PadLeft(8, '0'), Make != null ? Make.Name.ToString().PadLeft(8, ' ') : string.Empty.ToString().PadLeft(8, ' '), MotorVehicleModel != null ? MotorVehicleModel.Name.ToString().PadLeft(8, ' ') : string.Empty.ToString().PadLeft(8, ' '), MaxPassengers.ToString().PadLeft(8, ' '), NoOfWheeels.ToString().PadLeft(8, ' '), Milage.ToString().PadLeft(8, ' '))); }