Create 8 ants...Created 8 ants. They are: ID = 0, x=0, y=0, weight = 0.00 ID = 1, x=1, y=2, weight = 4.20 ID = 2, x=2, y=4, weight = 8.40 ID = 3, x=3, y=6, weight = 12.60 ID = 4, x=4, y=8, weight = 16.80 ID = 5, x=5, y=10, weight = 21.00 ID = 6, x=6, y=12, weight = 25.20 ID = 7, x=7, y=14, weight = 29.40 Again the Ants are: ID = 0, x=0, y=0, weight = 0.00 ID = 1, x=1, y=2, weight = 4.20 ID = 2, x=2, y=4, weight = 8.40 ID = 3, x=3, y=6, weight = 12.60 ID = 4, x=4, y=8, weight = 16.80 ID = 5, x=5, y=10, weight = 21.00 ID = 6, x=6, y=12, weight = 25.20 ID = 7, x=7, y=14, weight = 29.40 Send doSomething() to the Ants, print return value: Ant ID=0 (wt=0.00) sent doSomething(): - Ant ID=0 sent getUniformRandomFractionOf( 0.000 ): -> r = 0.39363 --> returnValue=0.000 --> -- returned 0.0 to variable d in Main. Ant ID=1 (wt=4.20) sent doSomething(): - Ant ID=1 sent getUniformRandomFractionOf( 4.200 ): -> r = 0.93010 --> returnValue=3.906 --> -- returned 3.9 to variable d in Main. Ant ID=2 (wt=8.40) sent doSomething(): - Ant ID=2 sent getUniformRandomFractionOf( 8.400 ): -> r = 0.04999 --> returnValue=0.420 --> -- returned 0.4 to variable d in Main. Ant ID=3 (wt=12.60) sent doSomething(): - Ant ID=3 sent getUniformRandomFractionOf( 12.600 ): -> r = 0.84593 --> returnValue=10.659 --> -- returned 10.7 to variable d in Main. Ant ID=4 (wt=16.80) sent doSomething(): --> returnValue=1.040 --> -- returned 1.0 to variable d in Main. Ant ID=5 (wt=21.00) sent doSomething(): - Ant ID=5 sent getUniformRandomFractionOf( 21.000 ): -> r = 0.00285 --> returnValue=0.060 --> -- returned 0.1 to variable d in Main. Ant ID=6 (wt=25.20) sent doSomething(): --> returnValue=1.560 --> -- returned 1.6 to variable d in Main. Ant ID=7 (wt=29.40) sent doSomething(): - Ant ID=7 sent getUniformRandomFractionOf( 29.400 ): -> r = 0.33662 --> returnValue=9.897 --> -- returned 9.9 to variable d in Main. Removed Ant from position (index) 3: ID = 3, x=3, y=6, weight = 12.60 The list now: 0 ID = 0, weight = 0.000 1 ID = 1, weight = 4.200 2 ID = 2, weight = 8.400 3 ID = 4, weight = 16.800 4 ID = 5, weight = 21.000 5 ID = 6, weight = 25.200 6 ID = 7, weight = 29.400 List after add Ant (wt=1000) back to pos=3: 0 ID = 0, weight = 0.000 1 ID = 1, weight = 4.200 2 ID = 2, weight = 8.400 3 ID = 3, weight = 1000.000 4 ID = 4, weight = 16.800 5 ID = 5, weight = 21.000 6 ID = 6, weight = 25.200 7 ID = 7, weight = 29.400 The list after adding ant again to end: 0 ID = 0, weight = 0.000 1 ID = 1, weight = 4.200 2 ID = 2, weight = 8.400 3 ID = 3, weight = 1000.000 4 ID = 4, weight = 16.800 5 ID = 5, weight = 21.000 6 ID = 6, weight = 25.200 7 ID = 7, weight = 29.400 8 ID = 3, weight = 1000.000 The list after setting weight of anAnt to 20000: 0 ID = 0, weight = 0.000 1 ID = 1, weight = 4.200 2 ID = 2, weight = 8.400 3 ID = 3, weight = 20000.000 4 ID = 4, weight = 16.800 5 ID = 5, weight = 21.000 6 ID = 6, weight = 25.200 7 ID = 7, weight = 29.400 8 ID = 3, weight = 20000.000 The list after removing it by reference: 0 ID = 0, weight = 0.000 1 ID = 1, weight = 4.200 2 ID = 2, weight = 8.400 3 ID = 4, weight = 16.800 4 ID = 5, weight = 21.000 5 ID = 6, weight = 25.200 6 ID = 7, weight = 29.400 7 ID = 3, weight = 20000.000 The list after randomizing weights: 0 ID = 0, weight = 0.989 1 ID = 1, weight = 0.896 2 ID = 2, weight = 0.632 3 ID = 4, weight = 0.220 4 ID = 5, weight = 0.514 5 ID = 6, weight = 0.914 6 ID = 7, weight = 0.279 7 ID = 3, weight = 0.635 The list categorized: Ant 0 wt = 0.989 (wt > 0.7). Ant 1 wt = 0.896 (wt > 0.7). Ant 2 wt = 0.632 (0.3 <= wt <= 0.7). Ant 4 wt = 0.220 (wt < 0.3). Ant 5 wt = 0.514 (0.3 <= wt <= 0.7). Ant 6 wt = 0.914 (wt > 0.7). Ant 7 wt = 0.279 (wt < 0.3). Ant 3 wt = 0.635 (0.3 <= wt <= 0.7). All done!