public Shape select(int qx, int qy) {
		for (int i = shapes.size() - 1; i >= 0; i--) {
			Shape shape = shapes.get(i);
			if (shape instanceof Square) {
				if (testInSquare((Square) shape, qx, qy)) {
					System.out.println("Square selected!");
					return shape;
				}
			}
			else if (shape instanceof Circle) {
				if (testInCircle((Circle)shape, qx, qy)) {
					System.out.println("Circle selected!");
					return shape;
				}
			}
			else if (shape instanceof Rectangle) {
				if (testInRectangle((Rectangle)shape, qx, qy)) {
					System.out.println("Rectangle selected!");
					return shape;
				}
			}
			else if (shape instanceof Ellipse) {
				if (testInEllipse((Ellipse)shape, qx, qy)) {
					System.out.println("Ellipse selected");
					return shape;
				}
			}
		}
		return null;
	}