40 lines
712 B
Java
40 lines
712 B
Java
package pakeje;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
public class Salle {
|
|
|
|
private int numero;
|
|
private ArrayList<Ouverture> listeOuvertures = new ArrayList<Ouverture>();
|
|
|
|
public Salle () {
|
|
this.numero = 0;
|
|
}
|
|
|
|
public Salle (int n) {
|
|
numero = n;
|
|
}
|
|
|
|
public void afficherInfos() {
|
|
System.out.println("Salle numero :" + numero );
|
|
for ( Ouverture ouvertureCourante : listeOuvertures) {
|
|
ouvertureCourante.afficherInfos();
|
|
}
|
|
}
|
|
|
|
public void ajouterOuvertures(Ouverture ouv) {
|
|
listeOuvertures.add(ouv);
|
|
}
|
|
public void retirerOuvertures(Ouverture ouv) {
|
|
listeOuvertures.remove(ouv);
|
|
}
|
|
|
|
public int getNumero() {
|
|
return numero;
|
|
}
|
|
|
|
public void setNumero(int numero) {
|
|
this.numero = numero;
|
|
}
|
|
|
|
} |