Exemple #1
0
        public Employee(decimal rate, int hours, String location)
        {
            if (rate < 0.0m)
            {
                throw new InvalidValueException();
            }
            if (hours < 0)
            {
                throw new InvalidValueException();
            }
            _locationChecker = new LocationChecker();

            if (!_locationChecker.CheckLocation(location))
            {
                throw new InvalidValueException();
            }
            _rate     = rate;
            _hours    = hours;
            _location = location;
        }
Exemple #2
0
 public double UpdateDistanceToNextWaypoint(GeoLocation location, TollPoint point)
 {
     return(LocationChecker.DistanceBetweenGeoLocations(location, point.Location));
 }