Beispiel #1
0
 public override string ToString()
 {
     return("Destination: " + Destination +
            "\nTotal Miles: " + DistanceTravelled +
            "\nFuel Consumed: " + GallonsConsumed.ToString("f1") + " gallons" +
            "\nCost: " + FuelCost.ToString("c") +
            "\nMPG: " + MilesPerGallon().ToString("f0") +
            "\nCost Per Mile: " + CostPerMile().ToString("c"));
 }