1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ipatiy [6.2K]
3 years ago
7

g Write a function named distance that takes four parameters: the x- and y-coordinates of the first point, followed by the x- an

d y-coordinates of the second point. It should return the distance between those two points, using the Pythagorean Theorem, for which you will need to import the math module and use the math.sqrt() function.
Computers and Technology
1 answer:
Inga [223]3 years ago
7 0

Answer:

   static double distance(double p1x, double p1y, double p2x, double p2y){

       // distance = sqrt(x2-x1)^2+(y2-y1)^2

       double xcord = Math.pow((p2x-p1x),2);

       double ycord = Math.pow((p2y-p1y),2);

       double distance = Math.sqrt(xcord+ycord);

       return distance;

   }

Explanation:

  • Using Java programming the language
  • Create the function to accept four double parameters x1, x2, y1, y2
  • Calculate the distance based on the formula \sqrt{(x2-x1)^{2}+(y2-y1)^{2}  }
  • Return the distance
You might be interested in
You've applied a filter. What's the best way to see the original data?
scoundrel [369]

The answer to your question is,

D. Toggle Filter. You don't want to remove the filter, you just want to see the difference.

-Mabel <3

5 0
4 years ago
Read 2 more answers
Which of the following recently developed technologies has NOT greatly increased the speed of information dissemination?
Luba_88 [7]
<span>The option which hasn't greatly increased the speed of information dissemination is C. typewriter. Information can be easily and quickly shared through smartphones that have Internet access, through emails which you can send at any time, and through teleconferencing, which is basically using your camera to talk to people. The only technology which isn't really helpful nowadays is the typewriter - there are better things, such as computers, that do a better job today.</span>
3 0
3 years ago
Read 2 more answers
When it comes to collecting and organizing prospect and account​ information, salespeople have a large variety of computer syste
OleMash [197]

Answer:

sales force automation systems

Explanation:

Based on the information provided within the question it can be said that in this scenario these are known as sales force automation systems (SFA). This type of system or software is used in order to automate various business tasks, including managing contacts, order processing, sales, inventory, etc. Which is why it is mostly used by the salespeople.

4 0
3 years ago
The___is a waterproof fabric that is placed around your camera
Zina [86]
Can you help me with homework and the answer is a circle
5 0
3 years ago
______ allows you to see through a slide background or a color.
sdas [7]
What are the choices.
5 0
4 years ago
Other questions:
  • Which two editions of Windows 7 support 64 bit CPUs? Choose two out of Professional, Business, Starter, or Home Premium.
    12·1 answer
  • A user can easily move to the end of a document by pressing the _____ key combination.
    10·2 answers
  • As a load is mechanically lifted, the materials ____________________.
    7·1 answer
  • Lube job---------$18.00
    14·1 answer
  • Nikolas has a idea that he could use the compressed carbon dioxide in a fire extinguisher to propel him on his skateboard. Nikol
    13·2 answers
  • Namecoin is an alternative blockchain technology that is used to implement decentralized version of Routing Banking System.A. Tr
    14·1 answer
  • What are the top ten alternative songs of the 2000's?
    7·1 answer
  • Many digital libraries have much more information than traditional libraries
    13·1 answer
  • What is the name of the User-defined function that is mentioned in the code?
    6·1 answer
  • Write a Python program that uses three variables. The variables in your program
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!