Question: JAVA You must complete the method calculateDistance which accepts the 4 integers which represent the x y coordinates of 2 different points. It will then
JAVA
You must complete the method calculateDistance which accepts the 4 integers which represent the x y coordinates of 2 different points. It will then return the distance between those points. Assume (x,y) are for the first point and (a,b) are for the second point. You need to use the Math library to calculate your square root and raise your powers.
public class DistanceCalculator { private DistanceCalculator() { }//end empty argument constructor public static double calculateDistance(int x, int y, int a, int b) { }//end calculateDistance }//end class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
