class TwoDPoint {

    // x and y are the data members of the class
    double x;
    double y;

    // Throughout this code, x and y can respectively be used instead
    // of this.x and this.y
	
    // The member functions or the methods of the class are given
    // below. No constructor is provided and the default (0-argument)
    // constructor is automatically generated by the Java compiler
    String getAsString() {
      return "(" + this.x + "," + this.y + ")";
    }

    void setX(double value) {
      this.x = value;
    }

    void setY(double value) {
      this.y = value;
    }

    double getX() {
      return this.x;
    }

    double getY() {
      return this.y;
    }

}
