tp2correction
This commit is contained in:
46
AppOuvertures.java
Normal file
46
AppOuvertures.java
Normal file
@@ -0,0 +1,46 @@
|
||||
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("-------------------------------------------");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user