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
qwelly [4]
4 years ago
14

Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to points Distance. The calculation is:

Computers and Technology
1 answer:
Nadusha1986 [10]4 years ago
4 0

<u>Question:</u>

Snapshot of the question has been attached to this response.

<u>Answer:</u>

<u></u>

import java.util.Scanner;

import java.lang.Math;

public class CoordinateGeometry{

    public static void main(String []args){

       double x1 = 1.0;

       double y1 = 2.0;

       double x2 = 1.0;

       double y2 = 5.0;

       double pointsDistance = 0.0;

       

       //Declare a variable to hold the result of (x2 - x1)²

       double x;

       

       //Solve (x2 - x1)^2 and store result in the variable x

       x = Math.pow(x2 - x1, 2);

       

       //Declare a variable to hold the result of (y2 - y1)²

       double y;

       

       //Solve (y2 - y1)^2 and store result in the variable y

       y = Math.pow(y2 - y1, 2);

       

       //Now pointsDistance = SquareRootOf(x + y)

       pointsDistance = Math.sqrt(x + y);

       

       System.out.println("Points distance: ");

       System.out.println(pointsDistance);

       

       return;

    }

}

<u>Sample Output:</u>

Points distance:  

3.0

<u>Explanation:</u>

The above code has been written in Java and it contains comments explaining important lines of the code. Please go through the comments.

The snapshots of the program and a sample output have been attached to this response.

You might be interested in
Modify the Comments.java program from Programming Exercise 1-10 so at least one of the statements about comments is displayed in
Zielflug [23.3K]
This isn’t even a question it’s just instructions for a question. can you elaborate???
4 0
3 years ago
2. Student organizations sometimes require transportation for off-campus activities, and school policy requires students to be o
Dafna11 [192]

Answer:

=IF(B2>=23,"Yes","No")

Explanation:

Given

Name = Kay Colbert

The Name column can't be used to determine the eligibility of a student to the transport.

What is needed is the corresponding age column of Kay's age.

Assume that the age column is B2 and the result column is C2 (See Attachment)

Enter the following in C2

=IF(B2>=23,"Yes","No")

This will return "Yes" without the quotes in cell C2 if B2 is greater than 23

Else, it'll return "No" without the quotes.

To drag the formula to other column, follow the instructions below

Select cell C2.

Rest your cursor in the lower-right corner so that it turns into a plus sign (+), like this:

Drag the fill handle downwards

3 0
3 years ago
To join a social network you create an avatar
Luda [366]
Yes you have to do that so people recognize u but not for all social media unless ur talking bout Facebook, Twitter, kik,and I can't think of anything else. At the moment I know lots more just can't think bout it right now
7 0
3 years ago
Read 2 more answers
Who was the first person in 1983 to offer a definition of the term computer virus
Simora [160]

Answer:

Fred Cohen

Explanation:

3 0
3 years ago
Read 2 more answers
Dani is paraphrasing from a paragraph of an article for a post on her blog. Which of the following strategies is least likely to
koban [17]
I would say A. She reads the entire paragraph, then rewrites it in her own words, and then checks to make sure her version is not too similar to the text from the article.


All the other ones are a little too obvious.


Hope this helps you, baii <33

4 0
3 years ago
Read 2 more answers
Other questions:
  • Pressing the e key while in edit mode will exit the interaction mode<br><br> true<br><br> false
    7·1 answer
  • When Web users enter the URL www.CIWcertified.com in their browser address bar, they can access the official CIW Web site at the
    6·2 answers
  • What does the internet engineering task force (IEFT) do?
    5·1 answer
  • It is possible to make the document larger for viewing small text.<br><br> True<br> False
    15·2 answers
  • A finally clause will execute:
    8·1 answer
  • Which line of code outputs the decimal portion of a float stored in the variable x? print (x % 1000) print (x) O print (x / 1000
    13·1 answer
  • A monopoly is a market that has few competing businesses. many sellers of the same item. many sellers of a variety of products.
    8·2 answers
  • A security administrator plans to conduct a vulnerability scan on the network to determine if system applications are up to date
    15·1 answer
  • Write a HTML program as shown in the output.​
    9·1 answer
  • Explain the basic operations of a computer system​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!