예제 #1
0
 public void TuneUp(string Make, string Model, int Year, FleetSim.Objects.Enum.Color color)
 {
     if (mileage - LastServiceMileage >= 30000)
     {
         LastServiceDate    = DateTime.Now;
         LastServiceMileage = mileage;
         Console.WriteLine("Vehicle tuned up at " + " " + LastServiceMileage + " miles on " + LastServiceDate + " " + "for" + " " + Make + " " + Model + " " + Year + " " + color + " ");
     }
     if (mileage >= 100000)
     {
         RebuildEngine(Make, Model, Year, color);
     }
 }
예제 #2
0
 public void RebuildEngine(string Make, string Model, int Year, FleetSim.Objects.Enum.Color color)
 {
     mileage            = 0;
     LastServiceMileage = 0;
     Console.WriteLine("Engine rebuilt on " + LastServiceDate + " " + "for" + " " + Model);
 }