Files
tp2/Responsable.java

25 lines
592 B
Java
Raw Permalink Normal View History

2025-10-07 16:55:57 +02:00
package Monpack2;
import java.util.ArrayList;
public class Responsable extends Personnel {
public Responsable(String nom) {
super(nom);
}
ArrayList<Responsable> listeResponsable = new ArrayList<Responsable>();
Responsable responsableCourant1 = new Responsable("Dupont");
Responsable responsableCourant2 = new Responsable("Durand");
public void ajouterResponsable(Responsable r) {
listeResponsable.add(r);
}
public void afficherResponsables() {
for (Responsable r : listeResponsable) {
System.out.println(r.getNom());
}
}
}