code: public static int calculateMod11CheckSum(int[] weights, StringNumber number) {
         int c = calculateChecksum(weights, number, false) % 11;
         if (c == 1) {
            throw new IllegalArgumentException(ERROR_INVALID_CHECKSUM + number);
         }
         return c == 0 ? 0 : 11 - c;
      }
docs: Calculate the check sum for the given weights and number.
  
  @param weights The weights
  @param number  The number
  @return The checksum