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