Reference no: EM132200806
Write a Java program that computes the spherical distance between two points on the surface of the Earth, given their latitudes and longitudes.
* User interface specifications:
-The program prompts for the desired two points in DDD MM SS Direction longitude and latitude format, each of which contains three integers and one character, separated by space(s).
-Ask users to enter four coordinates in four separate lines. The first line must be the latitude of the first point, the second line is for the longitude of the first point, and the remaining two lines are for the latitude and longitude of the second point.
There must be space(s) between each DDD MM SS Direction component.
- The data input lines are separated from prompt message lines. In other words, after each prompt message is displayed, your program should force user to enter data on a new line.
Example)
Latitude 1?
33 56 4 N
Longitude 1?
118 24 0 W
Latitude 2?
36 7 2 N
Longitude 2?
86 40 2 W
* Output
- Display the distance between the two designated points, descriptively and friendly
- Make sure to display the result in miles