class WorkCenter {

  private Worker leader;
  private final List<Worker> workers = new CopyOnWriteArrayList<>();

  /**
   * Create workers and set leader.
   */
  public void createWorkers(int numberOfWorkers, TaskSet taskSet, TaskHandler taskHandler) {<FILL_FUNCTION_BODY>}

  public void addWorker(Worker worker) {
    workers.add(worker);
  }

  public void removeWorker(Worker worker) {
    workers.remove(worker);
  }

  public Worker getLeader() {
    return leader;
  }

  /**
   * Promote a leader.
   */
  public void promoteLeader() {
    Worker leader = null;
    if (workers.size() > 0) {
      leader = workers.get(0);
    }
    this.leader = leader;
  }

  public List<Worker> getWorkers() {
    return workers;
  }
}

    for (var id = 1; id <= numberOfWorkers; id++) {
      var worker = new Worker(id, this, taskSet, taskHandler);
      workers.add(worker);
    }
    promoteLeader();
  
<no_super_class>