Here is the distanceTo method that I have
public double distanceTo(Point other)
{
return distanceTo(other);
}
And this is the driver that used the method:
System.out.print("expected: ???\ngot: ");
p1 = new Point(2,1);
p2 = new Point(5,4);
System.out.println(p1.distanceTo(p2));

New Topic/Question
Reply



MultiQuote




|