Question: in java Write a method that takes 2 coordinates in a 2D plane ( x,y coordinates) and computes the distance between these two points, according
in java
Write a method that takes 2 coordinates in a 2D plane ( x,y coordinates) and computes the distance between these two points, according to the distance formula, which is as follows: distance=(x2x1)2+(y2y1)2 This method must be named and it must have 4 parameters. The first parameter will be the x-coordinate of the first point, the second parameter will be the y-coordinate of the first point, the third parameter will be the x-coordinate of the second point, and the fourth parameter will be the y-coordinate of the second point. This method must return a Calling would return You can call your method in the program's main method so you can test whether it works, but you must remove or comment out the main method before checking your code for a score
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
