subject

JAVA 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.
The farthest points are given by:
• Farthest North - maximum latitude
• Farthest South- minimum latitude
• Farthest East - maximum longitude
• Farthest West - minimum longitude
Please note - you are not expected to enter all of Lily's data into your program: you can simply make up some sample data points if you wish.
the sample runs are in the picture.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
You know the right answer?
JAVA Write a program into which we could enter Lily's Longitude and Latitude data. Each time a new...
Questions
question
Chemistry, 24.06.2020 06:01
question
Mathematics, 24.06.2020 06:01
question
Mathematics, 24.06.2020 06:01