impl de employe du buufe

This commit is contained in:
trochas
2024-11-28 11:12:28 +01:00
parent 9089916d13
commit d949e97583
4 changed files with 24 additions and 6 deletions

View File

@@ -1,6 +1,10 @@
public class Compartiment{
protected final int QUANTITE_MAX = 1000;
private int quantite_courant = 0;
private int quantite_courant;
Compartiment(){
quantite_courant = 0;
}
synchronized void remplir(){
quantite_courant = QUANTITE_MAX;

View File

@@ -1,3 +0,0 @@
public class Employe_bu_buffet extends Employe{
}

View File

@@ -0,0 +1,18 @@
public class Employe_du_buffet extends Employe{
private Compartiment compPoisson;
private Compartiment compViande;
private Compartiment compLegume;
private Compartiment compNouille;
Employe_du_buffet(Compartiment compPoisson,Compartiment compViande,Compartiment compLegume,Compartiment compNouille){
this.compPoisson = compPoisson;
this.compViande = compViande;
this.compLegume = compViande;
this.compNouille = compNouille;
}
}

View File

@@ -8,7 +8,6 @@ public class Restaurant {
private Compartiment compLegume = new Compartiment();
private Compartiment compNouille = new Compartiment();
Employe_bu_buffet employeB = new Employe_bu_buffet(compPoisson,compViande,compLegume,compNouille);
Employe_du_buffet employeB = new Employe_du_buffet(compPoisson,compViande,compLegume,compNouille);
}