modif bug fonction pas implentrer

This commit is contained in:
2022-12-03 19:46:29 +01:00
parent e628cdfa6f
commit 2d267a07b0
2 changed files with 16 additions and 3 deletions

View File

@@ -218,7 +218,20 @@ public class AbstractGroupeFactoryNP implements AbstractGroupeFactory {
* @throws java.lang.NullPointerException si le String est null.
*/
public Set<Groupe> getGroupesOfEtudiant(Etudiant etu){
throw new UnsupportedOperationException("pas encore implanté");
Set<Groupe> liste=new HashSet<>();
for(Groupe g:this.brain.values()){
boolean condit=false;
for(Etudiant e:g.getEtudiants()){
if(e.getId()==etu.getId()){
liste.add(g);
condit=true;
break;
}
if(condit==true)
break;
}
}
return liste;
}
@Override