This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Randomly pick a pigeon, go through the array list (called flock) that contains all pigeons, and find the first occurrence of a pigeon with a smaller strength that is closer to the bucket. If such a pigeon is found, remove that pigeon and move your first pigeon to that position. Continue this process until one of the pigeons reaches the bucket (i.e. distance becomes zero) Display the surviving flock information (i.e. name, position) Ladan Mahabadi Today, 10:50 AM Added Text Ladan Mahabadi Today, 10:48 AM Deleted: Tab Pigeons and Files: Your program should retrieve the number of pigeons, and their information from a file called pigeon.txt. The first line in the file will be the number, followed by the information about the pigeons (each line corresponds to one pigeon). Go through the calculations as above, and then write the information of the surviving flock to a new file called remainingPigeons.txt....
View Full Document
This note was uploaded on 04/14/2008 for the course COMP 202 taught by Professor Verbrugge during the Winter '07 term at McGill.
- Winter '07