Question: In java complete the following Write a Java application that finds the closest state to a given latitude and longitude. The file states.txt contains the
Write a Java application that finds the closest state to a given latitude and longitude. The file states.txt contains the approximate latitude (North) and longitude (West) of the center of each state. Your program should ask the user for a latitude and longitude. It should then search the file for the state that is closest to the given location. The distance can be calculated by distance=latitude Difference? + longitudeDiff erence? Each line in the states.txt file contains latitude longitude name of the state Example input and output Enter your X and Y location >36 79.75 North Carolina is the closest state Enter your X and Y location >38 90 Missouri is the closest state
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
