subject

Edhesive JAVA The scenario: Lily's Longitude/Latitude Write a program into which we could enter Lily’s Longitude and Latitude data. Each time a new longitude and latitude is entered it should ask if you want to continue - the program should continue to ask for input if the user enters 1, and stop when the user enters 0. If an invalid pair of coordinates entered by the user (i. e. with latitude not between -90 and 90 inclusive or longitude not between -180 and 180 inclusive) then the program should print "Incorrect Latitude or Longitude".
Once the user has finished inputting data, the program should display the farthest distance traveled by Lily in each direction (you may assume the user has entered at least one valid longitude/latitude pair). However any invalid pairs of coordinates should be ignored when calculating these values - this includes ignoring a valid latitude if it is entered with an invalid longitude and vice-versa.
Sample Run:

Please enter the longitude:
69.938
Please enter the latitude:
41.678
Would you like to enter another location (1 for yes, 0 for no)?
1
Please enter the longitude:
69.862
Please enter the latitude:
41.755
Would you like to enter another location (1 for yes, 0 for no)?
1
Please enter the longitude:
69.947
Please enter the latitude:we are
41.829
Would you like to enter another location (1 for yes, 0 for no)?
1
Please enter the longitude:
69.988
Please enter the latitude:
300
Incorrect Latitude or Longitude
Would you like to enter another location (1 for yes, 0 for no)?
1
Please enter the longitude:
69.904
Please enter the latitude:
41.827
Would you like to enter another location (1 for yes, 0 for no)?
0
Farthest North: 41.829
Farthest South: 41.678
Farthest East: 69.947
Farthest West: 69.862

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Program description: a c# app is to be created to produce morse code. the morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). in sound-oriented systems, the dot represents a short sound and the dash represents a long sound. separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. in a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted. the international version of the morse code is stored in the data file morse.txt.
Answers: 3
question
Computers and Technology, 22.06.2019 02:00
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Budgets you to do all of the following expect a) send frivolously b) avoid over spending c) gain financial independence d) examine your priorities and goals
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
You know the right answer?
Edhesive JAVA The scenario: Lily's Longitude/Latitude Write a program into which we could enter Lil...
Questions
question
History, 05.08.2019 00:30
Questions on the website: 13722361