code: public void setCoilStatus(int index, boolean b) {
          if (index < 0) {
              throw new IllegalArgumentException(index + " < 0");
          }
  
          if (index > coils.size()) {
              throw new IndexOutOfBoundsException(index + " > " + coils.size());
          }
  
          coils.setBit(index, b);
      }
docs: Sets the status of the given coil.
  
  @param index the index of the coil to be set.
  @param b     true if to be set, false for reset.