(Note if one already exists, just ignore this post.
)
So here is a new
Pattern. We shall call it:
the BusStop Pattern
Basically it uses a LinkedList to store a Collection of events, Usually there is a count, and the count is changed at each event. You can create a "Schedule and find all the "event" points and get the count value and other derived values.
So for instance you have a Bus that have N passengers when it starts. At a particular point in time, it stops and some passengers get on and some leave, You could have a count of currentPassenger count. But you can also find out how many have gotten on so far, and how many have gotten off.
The Events could also have start and end times so that we can go even further and use each time as a point of interest.
So lets build the classes.
1. We have the Event class that stores the count, and has a start and end count
2. We obviously have the LinkedList class.
3. Maybe some Mediator type class to handle the information gathering and display.
Mark