Project 2 Class Questions and Answers

Q6:  The second assumption of Level 2 says "Provide a solution such that people should not wait any longer than necessary to cross the bridge.  What does "any longer than necessary" really mean?  Suppose 5 Smiths, 1 Jones, and 3 Smiths come in this  order.  If 8 Smiths go before the 1 Jones, did this Jones wait longer than necessary?
A6:  What happens if another 3 Smiths come and then another 3 Smiths and so on -- how long might the Jones have to wait?  Seems like it could be a long time.

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.