I am trying to implement a airline check-in line. I have three types of customers-generic, frequent flyers, and elite. Elite further breaks down down into gold, silver and bronze. The ranking follows that generic and frequent flyers are the lowest priority of customers. The check-in clerks can wait on these customers and added to a queue until an Elite customer is next in line. Since Elite customers have higher ranking, the generic or frequent flyer must wait until this Eilte customer is added to its stack. Then the generic or frequent flyer can be added to a queue. For example the line looks like:
1 can be added to the queue because 2 has the same rank. But 2 can't be processed until 3 and 4 are added to their appropriate stack.
I was hoping someone could provide me some help. I've been banging my head on trying to think on how to hold a customer for processing and process the next customers in line with higher ranking. Then adding the customer I had to hold. My implementation just processes one customer right after the other. Please any help would be awesome.