what is the valid range of latitude values
Latitude measures how far north or south of the equator a place is located. The equator is situated at 0Â°, the North Pole at 90Â° north (or 90Â°, because a positive latitude implies north), and the South Pole at 90Â° south (or â90Â°). Latitude measurements range from 0Â° to (+/â)90Â°. Longitude measures how far east or west of the prime meridian a place is located. The prime meridian runs through Greenwich, England. Longitude measurements range from 0Â° to (+/â)180Â°. In your setter for latitude, check if the value being set falls between -90 and 90 degrees. If it doesn't, throw an exception. For your longitude, check to see if the value falls between -180 and 180 degrees.