
Need help (Method)
This is the question
Write method distance to calculate the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be of type double. Incorporate this method into an application that enables the user to enter the coordinates of the points.
Hints:
• The distance between two points can be calculated by taking the square root of
( x2  x1 )2 + ( y2  y1 )2
• Use Math class methods to compute the distance.
• Your output should appear as follows:
Type the endoffile indicator to terminate
On UNIX/Linux/Mac OS X type <ctrl> d then press Enter
On Windows type <ctrl> z then press Enter
Or Enter X1: 1
Enter Y1: 1
Enter X2: 4
Enter Y2: 5
Distance is 5.000000
Type the endoffile indicator to terminate
On UNIX/Linux/Mac OS X type <ctrl> d then press Enter
On Windows type <ctrl> z then press Enter
Or Enter X1: ^Z

Re: Need help (Method)
What have you done to solve this? Post some code and we can help you out but I will not just give you this answer.

Re: Need help (Method)
Look at the question given and try to solve it on paper first. Modify that into
pceudocode (spelling?) and create a workable algorithm from that.
Wishes Ada xx