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.

JAVAWrite A Program Into Which We Could Enter Lily's Longitude And Latitude Data. Each Time A New Longitude

Answers

Answer 1

import java.util.Scanner;

public class JavaApplication59 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       double north = -180, south = 180, east = -90, west = 90;

       while (true){

           System.out.println("Please enter the longitude:");

           double lon = scan.nextDouble();

           System.out.println("Please enter the latitude:");

           double lat = scan.nextDouble();  

           if (lon > 90 || lon < -90 || lat >180 || lat < -180){

               System.out.println("Incorrect Latitude or Longitude");

           }

           else{

               if (lat > north){

                   north = lat;

               }

               if (lat < south){

                   south = lat;

               }

               if (lon > east){

                   east = lon;

               }

               if (lon < west){

                   west = lon;

               }

           }

           System.out.println("Would you like to enter another location (1 for yes, 0 for no)?");

           int choice = scan.nextInt();

           if (choice == 0){

               break;

           }

       }

       System.out.println("Farthest North: "+north);

       System.out.println("Farthest South: "+south);

       System.out.println("Farthest East: "+east);

       System.out.println("Farthest west: "+west);

   }

   

}

I hope this helps!


Related Questions

1.Anong uri ng application software ang iyong ginamit upang makapagtutuos ka ng datos?

2.Mahalaga ba na matutunan mo ang ganitong kasanayan sa pagtutuos o pagkalkyula ng mga datos gamit ang spreadsheet software sa computer?

Answers

Answer:

The answer is "Microsoft Excel"

Explanation:

Please find the complete and correct question in the attached file.

It will use Microsoft Excel to calculate formulas may be put throughout every cell. Excel works for use of the readily accessible or available on-line resources.  

It can be linked to multiple files, servers, and information sources. It can also create a factory reset to allow Excel to process a data box folder, that's why it's important to learn to quantify of it's skill.

30 points! Help me out, please! I need help with this!

Answers

Answer:

Both are touchscreen.

Tablets are seen more as an entertainment device (tv, games, etc.).

Phones are smaller, and used more for everything; you can take phones anywhere you go, whereas tablets are more difficult to transport.

Daniel is writing about emergency steps to take if a fire breaks out in school. Which organizational aid would be
most useful?
O a sequence chart
O a timeline
a Venn diagram
O a web diagram

Answers

Answer:

sequence chart

Explanation:

Answer:

a sequence chart

Explanation:

i took the test

How do use a search engine?

Answers

Answer:

You choose your search engine then you click the search bar and type what you want to know enter it and then click a website to visit

Explanation:

Which of the following is an open-source web browser?
O Firefox
O Internet Explorer
O Opera
O Telnet

Answers

Answer:

Firefox

Explanation:

Not much to explain.

Firefox is the only open-sourced web browser here.

what are output devices ?
name them​

Answers

Answer:

Monitor.

Printer.

Headphones.

Computer Speakers.

Projector.

GPS.

Sound Card.

Video Card.

Explanation:

List 5 applications for working with text

Answers

Answer:

TTSReader, Go2PDF, Free File Merge, Batch Text File Editor

Explanation:

I'll give brainlyist
Identify data types
13.5
-6
“18 Mingle Lane”
False
-20.4
“Bonjour”
12345

Answers

Answer:

1. Float

2. Integer

3. String

4. Boolean

5. Float

6. String

7. Integer

Explanation:

To identify data types, we need to understand the following concepts.

Data types are categorised into 2.

1. Numeric data types

2. Non numeric data types

The numeric data types are represented by numbers and is subdivided into 2.

i. Integer: Numbers without decimals (could be positive or negative)

ii. Float or Real: Numbers with decimals (could also be positive or negative)

Going by the above illustration,

13.5 and -20.4 are float data types

-6 and 12345 are integer

2. Non numeric data types: These are data that are different from numbers or digits. They could be images, string & character, boolean, dates, etc.

I'll limit my explanation to the scope of this assignment.

String are texts and are denoted by open and close quotes ("...") i.e. data that are present with quotes are strings

Boolean are data with true or false values

So, by this explanation:

"18 Mingle Lane" and "Bonjour" are strings variables

And

False is boolean

Answer:

Float, Integer, String, Boolean, Float, String, Integer.  

Explanation:

What connections do you see between variables and what you learned about the Input-Output-Store-Process model of a computer?

Answers

Answer:

h

Explanation:

The binary number represented by the voltage graph below is

Answers

Answer:

4

Explanation:

Answer: 11010100

here ya go :)

Fill in the blank
A file can be saved with a different file name than it currently has by clicking on Save____ in the File tab.

Answers

Explanation:

save as because if u want to save the bame of it press save as to save it as what u want

Answer:

save as

Explanation:

if you're gonna save it over writing a different one save as is the answer

If you have different movie or audio file types saved to your computer and your computer can only play the OGG format instead of the MP4 video format, what should you do?

Answers

Answer:

convert the MP4 format file to the OGG format file                  

Explanation:        

An OGG file is a compressed audio file of Ogg Vorbis that is used for holding audio data. It is a free and an open container file format which is maintained by Xiph.Org Foundation. OGG format file can multiplex independent streams of video, text, audio and meta data.

The OGG file has better sound quality and characteristics than a MP3 or MP4 files. The MP4 file format can be converted into OGG format file if the files are saved in different formats in the computer which can play only OGG format.

A town government is designing a new bus system and are deciding where to put the different bus stops. They want to pick the collection of locations that minimizes the distance anyone needs to walk in order to get to at least one bus stop. What term best defines the kind of problem?

An optimization problem

An undecidable problem

An efficiency problem

A decision problem

Answers

Answer:

Optimisation Problem

Explanation:

Optimisation Problem is a mathematical economics, computer science problem - which finds the best solution from all feasible solutions (based on constraints & other aspects).

The problem might be in form of maximisation or minimisation. The bus system designing is based on minimizing walking distance. Thus is an optimisation problem.

The term which best defines this kind of problem is: A. An optimization problem.

A problem can be defined as an issue or challenge encountered by an individual, which typically requires a solution.

Basically, a problem is considered to either be simple or complex, depending on the individual, parameters, and factors that are involved.

Generally, there are four (4) main kinds of problem and these include:

An undecidable problem.A decision problem.An efficiency problem.An optimization problem.

An optimization problem determines the best solution to a problem, from a list of feasible solutions.

Hence, an optimization problem can be used to pick a collection of locations that are likely to minimize the distance anyone needs to walk, so as to get to at least one bus stop.

Read more: https://brainly.com/question/22828534

explain what led to the invention of lasers

Answers

Answer:

The laser is an outgrowth of a suggestion made by Albert Einstein in 1916 that under the proper circumstances atoms could release excess energy as light—either spontaneously or when stimulated by light.

Explanation:

The laser is an outgrowth of a suggestion made by Albert Einstein in 1916 that under the proper circumstances atoms could release excess energy as light—either spontaneously or when stimulated by light. German physicist Rudolf Walther Ladenburg first observed stimulated emission in 1928, although at the time it seemed to have no practical use.

In 1951 Charles H. Townes, then at Columbia University in New York City, thought of a way to generate stimulated emission at microwave frequencies. At the end of 1953, he demonstrated a working device that focused “excited” (see below Energy levels and stimulated emissions) ammonia molecules in a resonant microwave cavity, where they emitted a pure microwave frequency. Townes named the device a maser, for “microwave amplification by the stimulated emission of radiation.” Aleksandr Mikhaylovich Prokhorov and Nikolay Gennadiyevich Basov of the P.N. Lebedev Physical Institute in Moscow independently described the theory of maser operation. For their work all three shared the 1964 Nobel Prize for Physics.

An intense burst of maser research followed in the mid-1950s, but masers found only a limited range of applications as low-noise microwave amplifiers and atomic clocks. In 1957 Townes proposed to his brother-in-law and former postdoctoral student at Columbia University, Arthur L. Schawlow (then at Bell Laboratories), that they try to extend maser action to the much shorter wavelengths of infrared or visible light. Townes also had discussions with a graduate student at Columbia University, Gordon Gould, who quickly developed his own laser ideas. Townes and Schawlow published their ideas for an “optical maser” in a seminal paper in the December 15, 1958, issue of Physical Review. Meanwhile, Gould coined the word laser and wrote a patent application. Whether Townes or Gould should be credited as the “inventor” of the laser thus became a matter of intense debate and led to years of litigation. Eventually, Gould received a series of four patents starting in 1977 that earned him millions of dollars in royalties.

The Townes-Schawlow proposal led several groups to try building a laser. The Gould proposal became the basis of a classified military contract. Success came first to Theodore H. Maiman, who took a different approach at Hughes Research Laboratories in Malibu, California. He fired bright pulses from a photographer’s flash lamp to excite chromium atoms in a crystal of synthetic ruby, a material he chose because he had studied carefully how it absorbed and emitted light and calculated that it should work as a laser. On May 16, 1960, he produced red pulses from a ruby rod about the size of a fingertip. In December 1960 Ali Javan, William Bennett, Jr., and Donald Herriott at Bell Labs built the first gas laser, which generated a continuous infrared beam from a mixture of helium and neon. In 1962 Robert N. Hall and coworkers at the General Electric Research and Development Center in Schenectady, New York, made the first semiconductor laser.

While lasers quickly caught the public imagination, perhaps for their similarity to the “heat rays” of science fiction, practical applications took years to develop. A young physicist named Irnee D’Haenens, while working with Maiman on the ruby laser, joked that the device was “a solution looking for a problem,” and the line lingered in the laser community for many years. Townes and Schawlow had expected laser beams to be used in basic research and to send signals through air or space. Gould envisioned more powerful beams capable of cutting and drilling many materials. A key early success came in late 1963 when two researchers at the University of Michigan, Emmett Leith and Juris Upatnieks, used lasers to make the first three-dimensional holograms (see holography).

Helium-neon lasers were the first lasers with broad commercial applications. Because they could be adjusted to generate a visible red beam instead of an infrared beam, they found immediate use projecting straight lines for alignment, surveying, construction, and irrigation. Soon eye surgeons were using pulses from ruby lasers to weld detached retinas back in place without cutting into the eye. The first large-scale application for lasers was the laser scanner for automated checkout in supermarkets, which was developed in the mid-1970s and became common a few years later. Compact disc audio players and laser printers for personal computers soon followed.

Which of the following audio file formats will provide the best audio streaming on the Internet?

Answers

Answer:

MP3

Explanation:

MP3 and . MP4 are the best audio file formats for use on the Web. All modern browsers support this format, including IE9. Other formats that are supported by most browsers include OGG, WebM, AAC, and WAV

Answer:

MP3

Explanation:

Edge 2021

why is this statement false: "when choosing the color of your font and your template background color, it is best to make them close in tone and hue"?

Answers

Answer:

A

Explanation:

Just a very strong guess

Edhesive 3.5 code practice quetion one

Answers

Answer:

x = int(input("What grade are you in? "))

if (x == 9):

   print("Freshman")

elif (x == 10):

   print("Sophomore")

elif (x == 11):

   print("Junior")

elif (x == 12):

   print("Senior")

else:

   print("Not in High School")

Explanation:

Hope this helps lovely :)

2. Identify two real-world examples of problems whose solutions do not scale well.

Answers

Answer:

The specification is defined downwards according to the conclusions reached.

Explanation:

Real-world instances or examples of issues that do not scale well are listed following table:

For different uses, such as solving the equation, respectively., multiplication matrices. It still does not scales or works well to organize a wide sequence of names or numbers as the requisite measures raise as squares by around the enlargement or increment.

ASAP in the middle of this quiz Which of the following arguments might convince a local school board of the need to train upper elementary school students in IT practices?


A As technology continues to advance rapidly, the need for IT professionals grows, providing more opportunities for employment of individuals skilled and experienced in the field of IT.

B Brain research shows that elementary students are better able to understand complex procedures; therefore, upper elementary students are more likely to understand the principles of IT than high school or college students.

C School computers break down often because of student use; therefore, the students should be responsible for fixing them.

D Computers are the wave of the future; therefore, elementary students should have a complete understanding of how they function.

Answers

Answer:

A.

Explanation:

Answer D seems too simplistic, and the question specifically mentions IT practices.

Question B doesn't seem right - college and high school students would likely be able to understand the principles as much.

Question C wouldn't be a good argument for a school board, and there's not a lot of evidence that backs it up.

Therefore, A seems to be the best choice here.

Hope this helps!

2. List at least three signal words the professor uses in the video. How did he use the signal

words?

Answers

Answer:

cherry

van

red

George

gold

HELP! Finish identifying the data types of each of the following pieces of data:

Answers

Answer:

Double

Int

Char

Boolean

Int

String

Byte if that is an array or Int

Answer:

Line 1: String

Line 2: Float

Line 3: Integer

Line 4: String

Line 5: Boolean

Line 6: Float

Line 7 String

Line 8: Integer

Explanation:

MS Coding 1 A - E d g e n u i t y 2021 March 17

Answerer's Note:

I hope this helped!

-- Juri Davis

Question # 6
Multiple Choice
The of a variable is determined by which parts of a program can view and change its value.
O influence
O magnitude
O scope
Orange

Answers

Answer:

Scope.

Explanation:

In programming, the scope could be static, private or public and in those, defines the scope of a specific variable.

Ex.

public int x = 0; // Can be seen when called within a whole class and outside of a class/ function.

private int y = 0; // Can be seen only within the class its defined in.

static pub/priv int z = 0; // Uncangeable variable that can be defined in both class and external class, depending on the two prior scopes defined after.

int aa = 0; // Defaults to private.

Answer:

the answer is scope, for me it's D but they tend to change.

Explanation:

Choose the correct term to complete the sentence.

______play(s) an essential role in calculating, gathering, and storing information in
the workplace

1.) breaches
2.) technology
3.) training

Answers

Answer:

3.) Technology

Explanation:

Technology is pretty epic, my dude.

3. When a small business buys office supplies online, it is an example of business-to- business e-commerce.
a. True
b. False​

Answers

Answer:

TRUE

Explanation:

Answer:

TRUE i think

Explanation: For example, an automobile manufacturer makes several B2B transactions such as buying tires, glass for windscreens, and rubber hoses for its vehicles. The final transaction, a finished vehicle sold to the consumer, is a single B2C transaction.

Joseph is a digital media developer and has years of work experience. He now wants to improve his management skills. What can he do to develop and sharpen his managerial skills? To improve his managerial skills, Joseph can enroll in a degree program.

Answers

Answer:

Following are the solution to this question:

Explanation:

Soft skills are best developed for irrespective of the occupation technical skills is a common skill, which everyone requires to master to work together and carry mostly on work successfully. A technically gifted individual needs soft skills to work with each other to the concept of work, to resolve issues, etc. The different soft training programs for different roles and decades of expertise are offered. therefore Professors propose learning in soft skills as well as an MBA degree.

Your company emphasizes the important of conserving (not wasting)
resources. How can you support that value when you print an 8-page report
you were asked to bring to your department's monthly meeting?
A. Use the Save option to choose a format readers can open.
B. Post the report online before printing it.
C. Use the Print option to create extra copies.
D. Use the Print option for two-sided printing.
SUBMIT

Answers

Answer:

D. Use the Print option for two-sided printing.

Explanation:

ape x

Answer:

D

Explanation:

Evidence that a source is authoritative includes a. An email address to ask further questions about information in the source c. No verbiage used which could identify bias about the information provided b. A date regarding when the source was written d. Logical structure of the information provided so that it is easily read and understood Please select the best answer from the choices provided A B C D

Answers

Answer:

i belive   it iz      C

Explanation:

o

Answer:

The correct answer is A

Explanation:

Will give BRAINEST if it's a very good answer
I keep asking for a phone and making reasons why i should have a phone, but if there's an emergency like kidnapping ima need to have a phone. but my parents say the first thing the'll do is take it away from you. What do i say to that response bc i rlly want a phone

Answers

Answer:

you have to try making them understand how important is your phone

Kyle returns to work the next day and he would like to continue working on the document from yesterday. What should Kyle do?


Double-click on the Start menu.

Look for his open document in the system tray.

Locate his file and click twice on it.

Locate his file, right click, and select Print.

Answers

Answer:

Locate his file and click twice on it.

the full forms
MU
memory unit
CU
control unit​

Answers

Answer:

u asking or saying ? ?????

Other Questions
The digital EGR valve used on GM 3800 engines allows for how many different EGR flow rates? The other options are both or neither plz help me or i will literly start cying cuz i dont rly understand What is 602,000,000 written in scientific notation Structure X of a cell is missing. This results in the lack of molecular warehousing and processing station. Transport vesicles from the ER are wandering around aimlessly. Structure X is likely the This is the construction of vessels that make voyages across the sea, and was an industry of primary importance to the American colonists Factor 2415 using the GCF. _____ is a smaller culture within the dominant culture that revolves around things like age, gender, class, race, religion, occupation or sexual orientation; they usually share the common characteristics of the dominant culture, but have unique values, styles, languages, & nonverbal communication. During a thunderstorm a tornado lift a car to a height of 300 m above the ground increasing and strength the tornado flings the car horizontally with the speed of 80.0 m/s how long does the car take to reach the ground how far horizontally does the car travel before hitting the ground READ ALOUDTRANSLATEASSESSMENT QUESTIONS6. How does the author use the structure of the text to develophis ideas? Be sure to describe how the major sections of thetext contribute to the text overall 2. In whose honor do you think this monument was built?3. Why do you think this monument was built to honor these four men?4. What other monuments do you know that have been built to honor a person or group of people? Where are these monuments? Whom do they honor?Please help with those 3 questions! PLEASE HELP ME ASAPIn a spreadsheet, cells B2 through B10 store the cost price of items and cells C2 through C10 store the selling price. If the selling price exceeds the cost price, you earn a profit. Otherwise, you suffer a loss. Which formula will you use to determine whether you earn a profit? A. =IF(C2>B2;"Profit";"Loss") B. =IF(C2 B2;"Loss";"Profit") D. =IF(C2>B2;"Profit";"Profit") A balloon of diameter 20.0 cm is filled with helium gas at 30C at 1.00 atm. Howmany atoms of helium gas fill a balloon having a diameter of 20.0 cm at 30.0Cat 1.00 atm? Can someone please transcribe (tribe) ANSWER NOW PLEASE!!!World War II required Oklahoma to develop military and aviation industries, which diversified its economy. Previously,the state was economically dependent on unstablemarketsA agriculture and petroleumB. petroleum and coalC. agriculture and manufacturingD. natural gas and manufacturing The image is basically the question. I am in the middle of this test plz help! 40 pages read in 20 minutes. what is the unit rate? Two identical spheres (of equal mass) a distance of 10 meters apart exert a force of gravity of 0.00050 N on each other. What are their masses? Find the unit rate.297 words in 5.5 minutesThe unit rate is words per minute.yo please do it right. ill mark brainliest only if its correct what is a rift valleyA. Where continental plates collide and form rifts of folded mountains in the crust.B. Where the ocean floor appears to be splitting and magma is rising from the mantle.C. Where a continental plate collides with an ocean plate to form a subduction zone.D. Where two ocean plates collide forming a subduction zone.