“Lost in the woods… a simulation experiment”
Much of the software development work you will do in this course will be done in groups. In HW1, we will apply Pair Programming approach. You will be randomly assigned a partner (unless you choose one), and the two of you will work together on this assignment. You may NOT work with anyone else on this assignment. If you need clarifications, please email me.
The Setup: Imagine two people are lost in a large forest. There is an impossibly difficult barrier that surrounds the forest. The two people wander around aimlessly. If they happen to end up in roughly the same part of the forest, they see each other and are happier than if they are all alone. Depending on how big the forest is, and how quickly they wander about, I wonder how long it will take for them to find each other?
Your Assignment: Write a program that works on the following problem:
What to submit?
Or might it be geometric? What other interesting questions might you explore? Graphics are going to be tough
this time (more on this soon), so think numbers and text, not pictures, for your “more.”
3. Design document, at this stage, I need class diagrams of the classes used showing the relations between them.
WHICH PROGRAMMING LANGUAGE MUST YOU USE? Java, or Python, if you want to use another language, please contact me before.
PROGRAMMING TIP: Since you want the wandering to be “random,” you should make sure that if you run your program twice with the same A and B inputs, you usually get DIFFERENT behavior. (I have to say “usually” there because every once in a while, you could get exactly the same behavior just by chance.) To make this happen, randomize your random number generator ONCE (right at the start of your program). Don’t randomize it in an inner loop – that’s terribly inefficient and unnecessary. Most programming languages have a built-in random number generator.
It is better to hand in something simple that works, and on time, rather than handing in something fancy that is either late or doesn’t work. The best HW1 programs will work, be on time, be well documented (see below), and will do something interesting.
The specification above mentions “well documented.” Here are some hints of what good documentation might look like:
Start your program with an “opening comment.” You may include more items than the items listed here, but you may NOT leave out any of the items mentioned here. If you DO leave any of these out, or if you do a poor job on any of them, you will lose points. If one of these items is not applicable to your program (for example, if it doesn’t use any external files), then include the name of the item in your opening comment but add “N/A” or “none” to indicate that this isn’t applicable to your program.
Items to include in your opening comment: