Question: Write a Java program such that: Enable user to enter 2 whole number values x and y (separated by tab or space). Part A: Calculate
Write a Java program such that:
Enable user to enter 2 whole number values x and y (separated by tab or space).
Part A:
Calculate distance between the two points having coordinates: A (x1, y1) and B (x2,y2)

Part B:
Calculate slope of the line AB with 2 points: A (x1,y1) and B (x2,y2)

Part C:
Calculate midpoint of the line AB with 2 points: A (x1,y1) and B (x2,y2)

d= V(x2 X1)2 + (y2 y)2. = - m = x y2-yi X2-X X 1 (x2, 42) 21 + x2 Y1 + y2 2 2 (01.41
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
