Computers and Technology

Computer science jobs are in demand. Right now we have a shortage of people that can do computer programming, and one of the fastest growing areas of new jobs in the sector are so-called hybrid jobs. This means you specialize in an area like biology, and then use computer programming to do your job. These hybrid jobs exist in the arts, sciences, economics, healthcare, and entertainment fields.

One of these jobs is computational biology. Computational Biology, sometimes referred to as bioinformatics, is the science of using biological data to develop algorithms and relations among various biological systems.

The scenario: Lily's Longitude/Latitude

In this activity, we are going to write a program which could be used to investigate data about the movements of a grey seal named Lily, who has been fitted with a GPS tracker.

Take a look at Lily's data here: Lily the Seal: movement data (Links to an external site.). You might spot that each row of data contains a longitude and latitude value (labeled Lon1 and Lat1). Longitude measures how far east/west on the Earth something is: the minimum/maximum value is at -180/180 degrees and is in the Pacific Ocean, while 0 degrees is the Grenwich meridian, cutting through London, UK. Latitude measures how far north/south something is. It ranges from -90 degrees (the south pole) to 90 degrees (the north pole) with the equator at 0 degrees.

The activity

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.

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
To help you with the development of this code, here are some useful milestones to consider. Note - these milestones encourage you to write the code in an iterative way: you will write a program with basic functionality and test it, then add more features in each milestone, rather than writing code in the order it appears in the program.

Milestone 1: Set up a scanner and an int variable to hold the answer to the question "Would you like to enter another location (1 for yes, 0 for no)?". Write a while loop based on this variable and add code to it which asks this question and gets an int response from the user.

Milestone 2: Write print/input statements to get the user to enter longitudes and latitudes inside the while loop. Write code which tests if these are both valid, and prints "Incorrect Latitude or Longitude" if not.

Milestone 3: Set up variables at the start of your program to hold the maximum and minimum longitudes and latitudes - set these to appropriate starting values based on the limits for longitude and latitude. Add code in the while loop which compares these values to the current maxima/minima and updates as appropriate. Write final print statements to print out the farthest North/South/East/West positions using these values.

(JAVA PLS)

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 13:00, cookie1701
Why the bear has a slunky tail determine the meaning of the word slunk in the story
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, maxdmontero
This assignment continues work on the online booking facility introduced at the end of chapter- 10. the work will be continued in the assignments for chapters 14 and 15 (a) assume that you will produce your online booking facility using an agile approach. i. suggest the kind of user research you would like to conduct for your product before iteration cycles begin. ii prioritize the requirements for your product according to business value, i. e which requirements are likely to provide the greatest business benefit, and sketch out the ux design work you would expect to undertake during the first four iteration cycles, i. e. cycle 0, and cycles 1 to 3. (b) using one of the mockup tools introduced above, generate a mockup of your product's landing page, as developed in the assignment for chapter-11 (c) using one of the patterns websites listed previously, identify suitable interaction patterns for elements of your product, and develop a software-based prototype that incorporates all the feedback and the results of the user experience mapping achieved at the end of chapter-11. if you do not have experience in using any of these, create a few html web pages to represent the basic structure of your website
Answers: 2
image
Computers and Technology, 24.06.2019 22:00, kingkush85
Difference between ancient and modern mode of information transmission
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, Jroc23
What are good colleges to apply to if you got like a 2.5 as a gpa? already got a call back from gcu at least its a start rt
Answers: 2
Do you know the correct answer?
Computer science jobs are in demand. Right now we have a shortage of people that can do computer pro...

Questions in other subjects: