main restaurant
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user