예제 #1
0
        public override string ToString()
        {
            StringBuilder relatorio = new StringBuilder();

            relatorio.AppendLine($"COMBUSTÍVEL CONSUMIDO: {CombustivelConsumido.ToString("F2", CultureInfo.InvariantCulture)}% DO TANQUE - DISTÂNCIA PERCORRIDA: {DistanciaPercorrida} KM");
            relatorio.AppendLine($"PARADAS ABASTECIMENTO: {ParadasAbastecimento} - PARADAS CALIBRAGEM: {ParadasCalibragem}");
            relatorio.AppendLine($"STATUS VIAGEM: {(VeiculoViagem.Viagem.DistanciaVariada <= 0 ? "CONCLUIDA" : "PENDENTE")}");
            relatorio.AppendLine($"CLIMA PREVISTO / INICIAL: {VeiculoViagem.Viagem.Clima}");
            relatorio.AppendLine("\n-- MUDANÇAS CLIMÁTICAS --");
            MundancasClimaticas.ForEach(x => relatorio.AppendLine(x));
            relatorio.AppendLine("\n-- DESCALIBRAGENS --");
            MudancasPneu.ForEach(x => relatorio.AppendLine(x));
            return(relatorio.ToString());
        }
예제 #2
0
        public void AdicionarOcorrenciaClimatica(double km, string clima)
        {
            string ocorrencia = $"MUDANÇA CLIMÁTICA NO KM {km}, CLIMA: {clima}";

            MundancasClimaticas.Add(ocorrencia);
        }