Domanda

So I will describe what I am trying to doing general.

  1. I have customers(the number of customers available varies at times due to weather, events, or location)
  2. I have a drink stand ( depending on certain factors serving times vary and added time to refill pitcher)
  3. The amount of customers coming to stand vary based on price, events, and popularity.
  4. Customers come to stand and if another customer is still at stand getting served then the others wait in line behind each other. (after so much time in line they complain about wait times)
  5. I want there to be a day timer so even if stand isnt finished serving customers then he loses them because wait time.

So I am not sure if using the Wait()/Notify() way would be best. I was thinking that maybe if I setup Customers as a class and brought it into the activity I am running the sales day in with the Stand info. I would appreciated help with finding a way to do this. I am still going through some other tutorials to see if I can understand a way to do this without screwing up.

È stato utile?

Soluzione

Found out that I need to send the customers into a queue when I have them arrive at the stand. Then also, the day timer will need to be set up to work off a countdown timer.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top