Fill This Form To Receive Instant Help
Homework answers / question archive / Write a class for storing a GPS coordinate, latitude and longitude
Write a class for storing a GPS coordinate, latitude and longitude. Longitude lines are perpendicular to and latitude lines are parallel to the Equator. The latitude of a point on Earth's surface is the angle between the equatorial plane and the straight line that passes through that point and through (or close to) the center of the Earth. The longitude of a point on Earth's surface is the angle east or west of a reference meridian to another meridian that passes through that point.
<a title="Unknown author, Public domain, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:FedStats_Lat_long.svg"><img width="400" alt="FedStats Lat long" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/FedStats_Lationg.svg/ 360px-FedStats_Lat jong.svg.png"></a>
Details
• Define a class GPS that will store latitude and longitude coordinates
• Use the provided enum class Compas to specify a coordinate direction
• The class must have following data members
• The class must contain following access or methods that allow read-only access to the encapsulated fields