answer.
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
Y_Kistochka [10]
2 years ago
6

CHALLENGE ACTIVITY 2.9.1: Coordinate geometry. Determine the distance between points (x1, y1) and point (x2, y2), and assign the

result to point Distance. The calculation is: Ex: For points (1.0, 2.0) and (1.0, 5.0), points Distance is 3.0.
Computers and Technology
1 answer:
Burka [1]2 years ago
7 0

Answer:

<em>import java.util.Scanner;</em>

<em>public class TestClass {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner input = new Scanner(System.in);</em>

<em>        System.out.println("Enter value for x1, x2, y1, y2");</em>

<em>        double x1 = input.nextDouble();</em>

<em>        double x2 = input.nextDouble();</em>

<em>        double y1 = input.nextDouble();</em>

<em>        double y2 = input.nextDouble();</em>

<em>        double xVal = Math.pow((x2-x1),2);</em>

<em>        double yVal = Math.pow((y2-y1),2);</em>

<em>        double distance = Math.sqrt(xVal+yVal);</em>

<em>        System.out.println(distance);</em>

<em>    }</em>

<em>}</em>

Explanation:

The code is written in Java Programming Language.

This code simply implements the formula for the distance between two points given as

distance =\sqrt{(x2-x1)^{2}+(y2-y1)^{2}  )}

The scanner class is used to prompt and receive all the variables that are declared.

Note that we used two special Java methods (Math.pow and Math.sqrt)

You might be interested in
There are two methods of enforcing the rule that only one device can transmit. In the centralized method, one station is in cont
Levart [38]

Answer:

In centralized method, the authorized sender is known, but the transmission line is dominated by the control station, while in decentralized method, one station can not dominate the line but collision on the transmission line may occur.

Explanation:

Centralized method of communication requires for a control station to manage the activities if other stations in the network. It assigns turns to one known station at a time, for transmission.

Decentralized method allows stations in a network to negotiate and take turns in transmitting data. When a station is done with the transmission line, another station on the queue immediately claims the line.

3 0
2 years ago
Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
marysya [2.9K]

Answer:

The customer's browser has been hijacked by some attackers may be.

Explanation:

According to customer's explanation there is  possibility that that his data may be stolen and he has to disconnect computer from network and then call given number in order to get back his data.

5 0
2 years ago
Which of the following provides a suite of integrated software modules for finance and accounting, human resources, manufacturin
zzz [600]

Answer:

B) ERP systems

Explanation:

ERP which means Enterprise Resource Planning is a software that uses a centralized database, it helps to hasten business processes thereby reducing the use of manual labour. Some of the integrated software modules which it provides are:

*Finance, Accounting.

*Human resource.

*Manufacturing and production.

*Sales and marketing.

The ERP system does not really need the total involvement of a human because it has a database where information stored is used in the daily execution of tasks, it can also be used to measure the productivity and profitability of the business.

6 0
2 years ago
You are working on a documentation file userNotes.txt with some members of your software development team. Just before the file
neonofarm [45]

Answer: Provided in the explanation section

Explanation:

The question says :

You are working on a documentation file userNotes.txt with some members of your software development team. Just before the file needs to be submitted, you manager tells you that a company standard requires that one blank space be left between the end-of-sentence period (.) and the start of the next sentence. (This rule does not affect sentences at the very end of a line.) For example, this is OK: Turn the knob. Push the "on" button. This is not: Turn the knob. Push the "on" button. Asking around among your team members, you discover that some of them have already typed their sentences in the approved manner, but others have inserted two or even more blanks between sentences. You need to fix this fast, and the first thing you want to do is to find out how bad the problem is. What command would you give to list all lines of userNotes.txt that contain sentence endings with two or more blanks before the start of the next sentence?

Solution:

Here, our fundamental aim is to look for the content which is having single space between different sentences. As it sentences finishing with . Going before with single and various spaces we have to channel and match just e the sentences which are finishing with ". "

For this we use order called "GREP" in Unix. "GREP " represents worldwide quest for standard articulation. This order is utilized inquiry and print the lines that are coordinating with determined string or an example. The example or indicated string that we have to look through we call it as customary articulation.

Syntax of GREP:

GREP [OPTIONS] PATTERN [FILE_NAME]

​​​​​​For our solution please follow the command

GREP "*\•\s$" userNotes.txt

Now it will display a all the lines having . Followed by single space.

6 0
2 years ago
The height of a small rocket y can be calculated as a function of time after blastoff with the following piecewise function: y 5
SOVA2 [1]

Answer:

High level Language

understand

Explanation:

rocket is 0...4433456u888

5 0
1 year ago
Other questions:
  • Write a program that can convert an integer between 0 and 15 into hex number (including 0 and 15). the user enters an integer fr
    15·1 answer
  • Witch printer covers a large range of colors than any other printer does
    15·2 answers
  • You are researching RAM for a computer you are building for a friend who will be using the system as a home office server for he
    14·1 answer
  • If the input is negative, make numItemsPointer be null. Otherwise, make numItemsPointer point to numItems and multiply the value
    9·1 answer
  • A triangular number is a number that is the sum of the integers from 1 to some integer n. Thus 1 is a triangular number because
    11·1 answer
  • Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less
    10·2 answers
  • Janeal spends her day looking at the stock and bond markets and evaluating how the portfolios of the businesses she serves will
    5·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • Quantum units of information deploy the properties of entanglement and ____ to offer exponentially greater computing power.
    9·1 answer
  • Which best compares and contrasts visual and performing arts? Both careers use communication skills; however, people involved in
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!