Пример #1
0
        public void AddDriver(Driver driver)
        {
            int distanceLimitForAddingDriver = 400;
            int allownedDriversCount         = (Route.Distance / distanceLimitForAddingDriver) + 1;

            if (DriverCollection != null)
            {
                IsDriverLicenseTypeSuitable(driver);
            }

            if (DriverCollection.Length < allownedDriversCount)
            {
                DriverCollection.Add(driver);
            }
        }
Пример #2
0
 public void RemoveDriver(Driver driver)
 {
     DriverCollection.Remove(driver);
 }