package lepack; public class ZeMain { public static void main(String[] args) { System.out.println("So far, so good... Yes I can spic ingliche.\n"); //---------------------------------------------- Ouverture ouv1 = new Ouverture("ouv 01", 90, null); Ouverture ouv2 = new Ouverture("ouv 02", 70, null); Ouverture ouv3 = new Ouverture("ouv 03", 50, null); Ouverture ouv4 = new Ouverture("ouv 04", 180, null); Salle salle1 = new Salle("S001"); salle1.ajouterOuverture(ouv1); salle1.ajouterOuverture(ouv2); Amphi amphi1 = new Amphi("A123",500, true); amphi1.ajouterOuverture(ouv4); Batiment bat1 = new Batiment("Usine à pizzas"); bat1.ajouterSalle(salle1); bat1.ajouterSalle(amphi1); try { bat1.ajouterSalle(salle1); }catch(Exception e) { System.out.println("Exception : " + e.getMessage()); System.out.println("... on choisir de continuer quand même..."); } System.out.println("\n======= test salle 1 ======="); salle1.afficherInfos(); System.out.println("\n======= test amphi 1 ======="); amphi1.afficherInfos(); System.out.println("\n\n======= test batiment 1 ======="); bat1.afficherInfos(); bat1.ajouterSalle(null); System.out.println("\n\nFin du prog sans plantage ! Yeees !"); } }