public double getY return y write your distanceTo method a

public double getY() { return y;}

// write your distanceTo method as if it is here

}

Solution

   public void setX(int x) {
       this.x = x;
   }

public double getY() { return y;}

// write your distanceTo method as if it is here

public double distanceTo(int x1, int y1){
       return Math.sqrt(Math.pow(x-x1,2) + Math.pow(y-y1,2));
   }

public double getY() { return y;} // write your distanceTo method as if it is here }Solution public void setX(int x) { this.x = x; } public double getY() { retu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site