Question: (IN JAVA) Define a method named distance2p that receives as arguments the x- and y- coordinates of one point followed by the x- and y-
(IN JAVA)
Define a method named distance2p that receives as arguments the x- and y- coordinates of one point followed by the x- and y- coordinates of another point (four arguments in all). The method returns the distance between the two points. Use the sqr method that you wrote in an earlier exercise to simplify the code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
