示例#1
0
 static void parkingTheVehicle(MotorVehicle vehicle, int parkingVehicle)
 {
     while (parkingVehicle != 0)
     {
         if (parkingVehicle == 1)
         {
             PublicAutopark.Add(vehicle);
         }
         else if (parkingVehicle == 2)
         {
             LogisticAutopark.Add(vehicle);
         }
         Console.WriteLine();
         Console.WriteLine($"Please write 0, to return to the first menu.");
         Console.WriteLine($"ATTENTION! - You can add THE SAME vehicle in the parking only once!!!");
         parkingVehicle = int.Parse(Console.ReadLine());
         if (true)
         {
             break;
         }
     }
 }
示例#2
0
 public virtual void Add(MotorVehicle vehicle)
 {
     this.vehicles.Add(vehicle);
 }
示例#3
0
 private void MAX(MotorVehicle vehicle)
 {
     this.maxPassengers += vehicle.maxPassenger;
 }
示例#4
0
 public override void Add(MotorVehicle vehicle)
 {
     base.Add(vehicle);
     MAX(vehicle);
 }
示例#5
0
 private void MAX(MotorVehicle vehicle)
 {
     this.maxCargoWeight += vehicle.maxCargoWeight;
 }