public class Point {
    int x;
    int y;

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

    void translate(int dx, int dy) {
        x += dx;
        y += dy;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj!= null && obj.getClass() == Point.class) {
            Point point = (Point) obj;
            return (point.x == this.x && point.y == this.y);
        } else {
            return false;
        }
    }

    @Override
    public String toString() {
        return "(x= " + x + ", y= " + y + ")";
    }
}

