46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package lepack;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
public class AppOuvertures {
|
|
|
|
private ArrayList<Batiment> listeBatiments;
|
|
|
|
private ArrayList<Technicien> listePersonnel;
|
|
|
|
public AppOuvertures() {
|
|
this.listeBatiments = new ArrayList<>();
|
|
this.listePersonnel = new ArrayList<>();
|
|
}
|
|
|
|
public void ajouterBatiment(Batiment b) {
|
|
if (b != null) {
|
|
this.listeBatiments.add(b);
|
|
}
|
|
}
|
|
|
|
public void ajouterPersonnel(Technicien p) {
|
|
if (p != null) {
|
|
this.listePersonnel.add(p);
|
|
}
|
|
}
|
|
|
|
|
|
public void afficherLePersonnel() {
|
|
System.out.println("--- LISTE DE TOUT LE PERSONNEL ---");
|
|
for (Technicien p : listePersonnel) {
|
|
|
|
// System.out.println(p.getFicheInfo());
|
|
}
|
|
System.out.println("------------------------------------");
|
|
}
|
|
|
|
public void afficherLesBatiments() {
|
|
System.out.println("\n--- LISTE DES BATIMENTS ET LEURS SALLES ---");
|
|
for (Batiment b : listeBatiments) {
|
|
b.afficherInfos();
|
|
System.out.println("---");
|
|
}
|
|
System.out.println("-------------------------------------------");
|
|
}
|
|
} |