public class Point{
  public double distanceFromOrigin() {
    return Math.sqrt(this.x
      *this.x + this.y *
this.y);
}

    public Point(double x, double y) {
      this.x = x; this.y = y; 
    }

protected double x;

  public void set(double newX, double newY) {
    this.x = newX;
    this.y = newY;
  }

  public String toString()
  { return "(" + this.x + "," + this.y + ")"; } public double getX() {
    return this.x;
  }

  public double getY
  () {
    return this.y;
  }

    public Point() { this.x = 0; this.y = 0; } protected double y;

  public int getQuadrant()
  { if (
      (this.x > 0) && (this.y > 0)
         ) { return 1; } else
    if ((
      this.x < 0
    ) && (
      this.y > 0
       )) { return 2;
}else
    if((this.x < 0)&&(this.y<    0)
    ) { return 3;

}
    else
      if ((this.x > 0) && (this.y < 0)) { return 4; }
                   else {
return 0; }}}
    
