|
Help with queue array please!!
Could someone please point me in the right direction. I am creating a queue array of customers. I have highlighted the code I am having problems with when trying to intalize the Queue, really cant get around this, any help?
class QueueCustomer{
final int MAXSIZE=5;
Customer queue[] = Customer [MAXSIZE];// Array called queue. Can store up to 5 customers
int qhead;
int qtail;
int qnoElements;
//Construct the queue
QueueCustomer(){
for(Customer tmpCustomer:queue)
tmpCustomer = ' ';
qhead = 0; /* head initialised to 0 to point to start of queue.*/
qtail = -1; /* tail initialised to -1 as the is no end of queue.*/
qnoElements = 0; /* noElements initialised to 0-No elements on queue.*/
}
|