code: public void updateRectangle(Point a, Point b, Symbol symbol) {
          int xfrom = (a.x < b.x) ? a.x : b.x;
          int xto = (a.x > b.x) ? a.x : b.x;
          int yfrom = (a.y < b.y) ? a.y : b.y;
          int yto = (a.y > b.y) ? a.y : b.y;
          for (int x = xfrom; x <= xto; x++) {
              for (int y = yfrom; y <= yto; y++) {
                  updateLocation(new Point(x, y), symbol);
              }
          }
      }
docs: Replace all tiles inside the rectangle with the provided symbol.
  @param a point a of the rectangle.
  @param b point b of the rectangle.
  @param symbol symbol to be inserted in each tile.