Q5: Should we use a random number generator for the time that
it takes an individual to cross or just hard code a few values (slow, fast,
twiddle feet)?
A5: You should use a random number for the duration -- but you
can make it so that you generate a number within an appropriate range.
(For testing purposes, you may want to hard-code specific values so you
can figure out if you code is behaving properly.)
Q4: Should we assume that there is a limited number of people
to cross the bridge or an infinite number?
A4: The problem states "Assume that there are an "unlimited"
number of Smiths and Jones." This means your solution must not be
dependent on a certain number of people. But for testing and demonstration
purposes, you may want to make the number of people be either hard-coded
or a run-time parameter to your program. In this way, you can know
when the simulation should end.
Q3: Would output be similar to the example in the book on page
176? Should each person say when they are heading onto the bridge
and when they exit?
A3: Output should reflect what happened during the simulation.
Q2: Should each person have a unique identifier, or will the
last name be sufficient?
A2: Each person must be uniquely represented.
Q1: Once across the bridge, do we need to worry about the person
again, or are they gone as far as we are concerned?
A1: Once across the bridge, you can assume that person is finished.