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; }
public double UpdateDistanceToNextWaypoint(GeoLocation location, TollPoint point) { return(LocationChecker.DistanceBetweenGeoLocations(location, point.Location)); }