tp2correction
This commit is contained in:
32
Responsable.java
Normal file
32
Responsable.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package lepack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Responsable extends Technicien {
|
||||
|
||||
|
||||
private ArrayList<Ouverture> listeSupervisions;
|
||||
|
||||
|
||||
public Responsable(String nom, int anneesExperience) {
|
||||
|
||||
super(nom, anneesExperience);
|
||||
|
||||
|
||||
this.listeSupervisions = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getFicheInfo() {
|
||||
System.out.println("--- Fiche RESPONSABLE ---");
|
||||
System.out.println("Nom : " + getNom());
|
||||
System.out.println("A supervisé " + this.listeSupervisions.size() + " ouverture(s).");
|
||||
}
|
||||
|
||||
public void ajouterSupervision(Ouverture o) {
|
||||
if (o != null) {
|
||||
this.listeSupervisions.add(o);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user