Files
actjavamarclaguerre/GestionTravaux.java
2025-10-07 16:41:03 +02:00

31 lines
2.5 KiB
Java

package lepack;
import java.util.ArrayList;
public class GestionTravaux {
private ArrayList<Batiment> listeBatiments;
private ArrayList<Ouverture> listeOuvertures;
private ArrayList<Technicien> listeTechniciens;
public GestionTravaux() {
this.listeBatiments = new ArrayList<>();
this.listeOuvertures = new ArrayList<>();
this.listeTechniciens = new ArrayList<>();
}
public ArrayList<Ouverture> getOuverturesNecessitantPlusDeKTechniciens(int k) {
ArrayList<Ouverture> resultat = new ArrayList<>();
for (Ouverture o : this.listeOuvertures) {
if (o.getNombreInstallateurs() > k) {
resultat.add(o);
}
}
return resultat;
}
}