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;
  }
@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);
    //r contains b1 and not b2
    assertTrue(r.contains(b1));
    assertFalse(r.contains(b2));
  }