Ejemplo n.º 1
0
        public override string GetDetails()
        {
            StringBuilder truckDetails = new StringBuilder();

            truckDetails.AppendFormat("{0}", base.GetDetails());
            truckDetails.AppendFormat("Is carrying hazardous materials: {0}{1}", m_IsCarryingHazardousMaterials.ToString(), Environment.NewLine);
            truckDetails.AppendFormat("Max carrying weight: {0}{1}", m_MaxCarryingWeight.ToString(), Environment.NewLine);
            truckDetails.AppendFormat("{0}{1}", EnergySource.GetEnergySourceDetails(), Environment.NewLine);
            truckDetails.AppendFormat("{0}", GetWheelsDetails());

            return(truckDetails.ToString());
        }
Ejemplo n.º 2
0
Archivo: Car.cs Proyecto: YoniME/DN-EX3
        public override string GetDetails()
        {
            StringBuilder carDetails = new StringBuilder();

            carDetails.AppendFormat("{0}", base.GetDetails());
            carDetails.AppendFormat("Color: {0}{1}", m_CarColor.ToString(), Environment.NewLine);
            carDetails.AppendFormat("Number of doors: {0}{1}", m_NumberOfDoors.ToString(), Environment.NewLine);
            carDetails.AppendFormat("{0}{1}", EnergySource.GetEnergySourceDetails(), Environment.NewLine);
            carDetails.AppendFormat("{0}", GetWheelsDetails());

            return(carDetails.ToString());
        }
Ejemplo n.º 3
0
        public override string GetDetails()
        {
            StringBuilder motorcycleDetails = new StringBuilder();

            motorcycleDetails.AppendFormat("{0}", base.GetDetails());
            motorcycleDetails.AppendFormat("License type: {0}{1}", m_LicenseType.ToString(), Environment.NewLine);
            motorcycleDetails.AppendFormat("Engine displacement: {0}{1}", m_EngineDisplacement.ToString(), Environment.NewLine);
            motorcycleDetails.AppendFormat("{0}{1}", EnergySource.GetEnergySourceDetails(), Environment.NewLine);
            motorcycleDetails.AppendFormat("{0}", GetWheelsDetails());

            return(motorcycleDetails.ToString());
        }