impl de employe du buufe
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
public class Compartiment{
|
public class Compartiment{
|
||||||
protected final int QUANTITE_MAX = 1000;
|
protected final int QUANTITE_MAX = 1000;
|
||||||
private int quantite_courant = 0;
|
private int quantite_courant;
|
||||||
|
|
||||||
|
Compartiment(){
|
||||||
|
quantite_courant = 0;
|
||||||
|
}
|
||||||
|
|
||||||
synchronized void remplir(){
|
synchronized void remplir(){
|
||||||
quantite_courant = QUANTITE_MAX;
|
quantite_courant = QUANTITE_MAX;
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
public class Employe_bu_buffet extends Employe{
|
|
||||||
|
|
||||||
}
|
|
||||||
18
src/Employe_du_buffet.java
Normal file
18
src/Employe_du_buffet.java
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@ public class Restaurant {
|
|||||||
private Compartiment compLegume = new Compartiment();
|
private Compartiment compLegume = new Compartiment();
|
||||||
private Compartiment compNouille = 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);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user