ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > CLASS (2016-2017-1)-62903-06102-1 > > Answer to problem 6.11 >
Answer to problem 6.11 Version 0
👤 Author: by 2249049559qqcom 2016-11-06 10:48:37
///////////////////////////////////////////

package sleeping_barber;

public class Barber {
private int chairNum;
private int barber;
private int chairState[];
static final int FULL = -1;
static final int EMPTY = 0;
static final int OCUPIED = 1;
static final int SLEEPING = 2;
static final int DONE = 3;
static final int WAITED = 4;
public Barber(int pChairNum){
chairNum = pChairNum;
chairState = new int[chairNum];
barber = SLEEPING;
//initialize every chair in the waiting room

Please login to reply. Login

Reversion History

Loading...
No reversions found.