class Reader implements Runnable {

  private final Lock readLock;

  private final String name;

  private final long readingTime;

  /**
   * Create new Reader.
   *
   * @param name        - Name of the thread owning the reader
   * @param readLock    - Lock for this reader
   * @param readingTime - amount of time (in milliseconds) for this reader to engage reading
   */
  public Reader(String name, Lock readLock, long readingTime) {
    this.name = name;
    this.readLock = readLock;
    this.readingTime = readingTime;
  }

  /**
   * Create new Reader who reads for 250ms.
   *
   * @param name     - Name of the thread owning the reader
   * @param readLock - Lock for this reader
   */
  public Reader(String name, Lock readLock) {
    this(name, readLock, 250L);
  }

  @Override
  public void run() {<FILL_FUNCTION_BODY>}

  /**
   * Simulate the read operation.
   */
  public void read() throws InterruptedException {
    LOGGER.info("{} begin", name);
    Thread.sleep(readingTime);
    LOGGER.info("{} finish after reading {}ms", name, readingTime);
  }
}

    readLock.lock();
    try {
      read();
    } catch (InterruptedException e) {
      LOGGER.info("InterruptedException when reading", e);
      Thread.currentThread().interrupt();
    } finally {
      readLock.unlock();
    }
  
<no_super_class>