Chpt8_Project

Write a Java program that stores the names of two cites in a single dimension array, and their latitude and longitude in a two-dimension array. Next calculate the distance between the city in miles and display.

Inputs: The names of two cities and their latitudes and longitudes.

Enter the first city:
Enter the second city:
Enter latitude and longitude of first city separated by a space (example 28.8 81.2):
Enter latitude and longitude of second city separated by a space (example 28.8 81.2):

The city names should be stored in a single dimension array that stores strings, and the latitudes and longitudes for each city should be stored as doubles in a two-dimension array.

Outputs: The distance between the two cities in miles, note: replace <> with the distance calculated

The distance between the two cities is <> miles

×
New Download