

class Point {
	private int xCoord = 0;
	private int yCoord = 0;

	public Point(int xCoord, int yCoord) {
		this.xCoord = xCoord;
		this.yCoord = yCoord;
	}

	public int getX() {
		return xCoord;
	}

	public int getY() {
		return yCoord;
	}

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

	public void setY(int yCoord) {
		this.yCoord = yCoord;
	}

	@Override
	public String toString() {
		return String.format("(%d,%d)", xCoord, yCoord);	
	}

	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof Point)) {
			return false;
		}

		Point that = (Point) obj;

		return (this.xCoord == that.xCoord &&
			this.yCoord == that.yCoord);

	}
	
}
