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 11:00
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
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
Mathematics, 08.09.2021 04:40
question
Chemistry, 08.09.2021 04:40
question
Mathematics, 08.09.2021 04:40
question
Mathematics, 08.09.2021 04:40
question
Mathematics, 08.09.2021 04:40
question
Mathematics, 08.09.2021 04:40
Questions on the website: 13722362