main restaurant

This commit is contained in:
Minh VU
2024-12-03 15:17:41 +01:00
parent 9452c0ea77
commit 1b7ad1b32f

View File

@@ -6,6 +6,7 @@ public class Restaurant {
private Employe_du_buffet employeB;
public Stand_de_cuisson stand_de_cuisson;
private Cuisinier cuisinier;
private Client[] clients= new Client[MAX_CLIENTS+5];
Restaurant(){
nbClient = 0;
@@ -15,8 +16,13 @@ public class Restaurant {
this.employeB = new Employe_du_buffet(buffet);
this.stand_de_cuisson = new Stand_de_cuisson();
this.cuisinier = new Cuisinier(stand_de_cuisson);
employeB.run();
cuisinier.run();
employeB.start();
cuisinier.start();
for(int i=0; i<clients.length; i++){
clients[i] = new Client(this);
clients[i].start();
}
}
@@ -39,5 +45,7 @@ public class Restaurant {
nbClient--;
}
}
public static void main(String[] args){
new Restaurant();
}
}