You're aware that you can draw a straight line between any two points in a plane, right? Probably, but if not, check out Euclid and his treatise called "Elements". Better yet, take this assertion on faith and write a static double getDistance(x1, y1, x2, y2) method. It should calculate the distance between two points.
Distance between two points