Example #1
0
  public String[] getProfessores(int id) throws NumeroInvalidoException, PeriodoNaoExisteException {

    String[] professores2 = null;
    String check = id + "";
    if (!check.matches("^[0-9]{1,45}$")) {
      throw new NumeroInvalidoException();
    } else if (this.rep.isItReal(id)) {
      Periodo p = this.rep.searchPeriodo(id);
      professores2 = p.getProfessores();
    }

    return professores2;
  }