public void AddProfessores(Professor p) { if (!professores.Contains(p)) { professores.Add(p); } }
public void AddRestricoes(Professor prof, Horario hor) { int i = 0; while (professores[i].nomeProfessor != prof.nomeProfessor) { i++; } professores[i].AddRestrincoes(hor); i = 0; while (horarios[i].ident != hor.ident) { i++; } horarios[i].AddRestHorario(prof); }
public void RemoveRestHorario(Professor prof) { restHorario.Remove(prof); }
public void AddRestHorario(Professor prof) { restHorario.Add(prof); }
Boolean CargaHorariaIncompleta(Professor p) { int alocAulas = 0; // verifica a quantidade de alocação do professor foreach (Alocacao aloc in Solucao.Componentes) { if (aloc.professor.nomeProfessor == p.nomeProfessor) { alocAulas++; } } if (alocAulas < 2) { return true; } else { return false; } }
Boolean RestrincaoHorario(Professor p, int i) { // verifica se o professor tem restrição if (p.Restricoes.Contains(horarios[i])) { return true; } else { return false; } }
public void RemoveProfessores(Professor p) { if (professores.Contains(p)) { professores.Remove(p); } }
public Alocacao(Professor prof, Horario hor) { professor = prof; horario = hor; }
public Alocacao() { professor = new Professor(); horario = new Horario(); }