does anyone know of a good example of a bank queue simulation?
I am looking for a textbook style example of a bank or supermarket queue simulation in java. I have seen a few examples but I would like the textbook style hand holding if you know what I mean.
I just want to see something simple that calculates number of customers served, average wait time, etc over a few hours simulated time given the average service and arrival times
Re: does anyone know of a good example of a bank queue simulation?
I'm not exactly sure what this simulation entails. Are you actually timing events? Or do you just have the data somewhere? I'd write up a short example if I knew more about it.
You could try creating a class that holds the times of certain events, then add them to an ArrayList. Then perform whatever calculations you need while iterating through the list. I'd be happy to show you an example, but first provide a little clearer explanation of what you're looking for.