The group has now been divided, my problem scenario is the following:
There are 2 packing machines, which can pack any type of food, however this needs to be done one at a time. Each food type takes 10 secs to pack.
The packing machines get the food from the processing machines, there are 3 processing machines. The food is stored in queues, the one with the shortest queue, the packing machine will get a food from that queue.
This is my problem:
I have thought about it, I need to add 2 queues to the packing machines because it has to store the food, do I need a queue or is an ArrayList fine?
The thing I dont understand is, how am I going to add the 10 seconds timer (10secs to pack a food).
private int packtime;
I know I need a field like this then I need to define it. Is this right or a static field?
Also how is it going to find which has the shortest queue? the .size method right? However, once this is done how will it just pick a food from the processing queue and add it to the packing machine queue/arraylist. One it is added, then somehow it will tell the packing machine and the processing machine queue will go down by1.
I am a beginner in java, so if I have made a lot of mistakes, please understand.