maj constructeur restaurant
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Restaurant {
|
||||
protected final int MAX_CLIENTS = 25;
|
||||
private int nbClient;
|
||||
|
||||
private ArrayList<Client> clients_stand = new ArrayList<Client>();
|
||||
|
||||
private Compartiment[] buffet = new Compartiment[4];
|
||||
private Employe_du_buffet employeB;
|
||||
private Stand_de_cuisson stand_de_cuisson;
|
||||
private Cuisinier cuisinier;
|
||||
|
||||
Restaurant(){
|
||||
nbClient = 0;
|
||||
for(int i = 0 ; i<buffet.length; i++){
|
||||
this.buffet[i] = new Compartiment();
|
||||
}
|
||||
employeB = new Employe_du_buffet(buffet);
|
||||
this.employeB = new Employe_du_buffet(buffet);
|
||||
this.stand_de_cuisson = new Stand_de_cuisson();
|
||||
this.cuisinier = new Cuisinier(stand_de_cuisson);
|
||||
employeB.run();
|
||||
}
|
||||
|
||||
|
||||
public synchronized boolean libre(){
|
||||
if(nbClient>MAX_CLIENTS){
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user