Download Lab # 10 - UET Taxila

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Lab # 12
Q # 01: In ocean investigation, locations are measured in degrees and minutes of latitude
and longitude. Thus if you are lying off the month of peppsette ; your location is 149
degree 34.8 minutes west longitude and 17 degree 31.5 minute south latitude. This is
written as 149834.8’W,17831.5’S. there are 60 minutes in a degree. Longitude is
measued from 0 to 180 degree east or west from Greenwich England to the international
dateline in the pacific. Latitude is measures from 0 to 90 degree north or south fro the
equator to the poles.
Create a class called angle that include three members variables; an int for degree, a float
for minutes and a char for the direction letter(N,S,E,W). this class can hold either a
latitude variable or a longitude variable. Write one member function to obtain an angle
value and a direction from the user and a second to display the angle value in 178985.9’E
format. Also write a three argument constructor. Write a main() program that displays an
angle initialized with the constructor and then within a loop, allow the user to input any
angle value and then display the value.