Question: (Please use JAVA) Write a program that prompts the user to enter two points (x1, y1) and (x2, y2). Calculate and display the distance between
(Please use JAVA)
Write a program that prompts the user to enter two points (x1, y1) and (x2, y2). Calculate and display the distance between the two points using the formula below. Round the answer up to 2 decimal points. You can use Math.pow(a,0.5) to compute the square root of an expression. Math.pow() returns a double.

For example, the distance between the points (2, 3) and (4, 4) is approximately 7.28, as shown below.
(Please use JAVA)
d = (x2 x}*+(yz - yi) d = (-4-(-2) +(4-(-3) = V-4+2)* +(4+3) = (-2) + (7) = +4+49 = 1538 7.28 CartesianCoordinateSystem Attributes - Operations + public double calculateDistance(double x1, double y1, double x2, double y2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
