### Question:
Rect { boolean contains(Point p) { return p.coordinateX >= this.coordinateX - this.width / 2 && p.coordinateX <= this.coordinateX + this.width / 2 && p.coordinateY >= this.coordinateY - this.height / 2 && p.coordinateY <= this.coordinateY + this.height / 2; } Rect(double x, double y, double width, double height);   }### Answer:
@Test void containsTest() { var r = new Rect(10, 10, 20, 20); var b1 = new Bubble(2, 2, 1, 1); var b2 = new Bubble(30, 30, 2, 1); assertTrue(r.contains(b1)); assertFalse(r.contains(b2)); }