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.25233 --> 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.44585 --> returnValue=1.873 --> -- returned 1.9 to variable d in Main. Ant ID=2 (wt=8.40) sent doSomething(): - Ant ID=2 sent getUniformRandomFractionOf( 8.400 ): -> r = 0.92860 --> returnValue=7.800 --> -- returned 7.8 to variable d in Main. Ant ID=3 (wt=12.60) sent doSomething(): - Ant ID=3 sent getUniformRandomFractionOf( 12.600 ): -> r = 0.78685 --> returnValue=9.914 --> -- returned 9.9 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.14537 --> returnValue=3.053 --> -- returned 3.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.69948 --> returnValue=20.565 --> -- returned 20.6 to variable d in Main. Removed Ant from position (index) 3: ID = 3, x=3, y=6, weight = 12.60 The list now: ID = 0, weight = 0.000 ID = 1, weight = 4.200 ID = 2, weight = 8.400 ID = 4, weight = 16.800 ID = 5, weight = 21.000 ID = 6, weight = 25.200 ID = 7, weight = 29.400 List after add Ant (wt=1000) back to pos=3: ID = 0, weight = 0.000 ID = 1, weight = 4.200 ID = 2, weight = 8.400 ID = 3, weight = 1000.000 ID = 4, weight = 16.800 ID = 5, weight = 21.000 ID = 6, weight = 25.200 ID = 7, weight = 29.400 The list after adding ant again to end: ID = 0, weight = 0.000 ID = 1, weight = 4.200 ID = 2, weight = 8.400 ID = 3, weight = 1000.000 ID = 4, weight = 16.800 ID = 5, weight = 21.000 ID = 6, weight = 25.200 ID = 7, weight = 29.400 ID = 3, weight = 1000.000 The list after setting weight of anAnt to 20000: ID = 0, weight = 0.000 ID = 1, weight = 4.200 ID = 2, weight = 8.400 ID = 3, weight = 20000.000 ID = 4, weight = 16.800 ID = 5, weight = 21.000 ID = 6, weight = 25.200 ID = 7, weight = 29.400 ID = 3, weight = 20000.000 The list after removing it by reference: ID = 0, weight = 0.000 ID = 1, weight = 4.200 ID = 2, weight = 8.400 ID = 4, weight = 16.800 ID = 5, weight = 21.000 ID = 6, weight = 25.200 ID = 7, weight = 29.400 ID = 3, weight = 20000.000 ID = 0, x=0, y=0, weight = 0.88 ID = 1, x=1, y=2, weight = 0.98 ID = 2, x=2, y=4, weight = 0.03 ID = 4, x=4, y=8, weight = 0.05 ID = 5, x=5, y=10, weight = 0.43 ID = 6, x=6, y=12, weight = 0.83 ID = 7, x=7, y=14, weight = 0.96 ID = 3, x=3, y=6, weight = 0.56 The list after randomizing weights: ID = 0, weight = 0.881 ID = 1, weight = 0.983 ID = 2, weight = 0.034 ID = 4, weight = 0.049 ID = 5, weight = 0.428 ID = 6, weight = 0.830 ID = 7, weight = 0.960 ID = 3, weight = 0.558 The list categorized: Ant 0 wt = 0.881 (wt > 0.7). Ant 1 wt = 0.983 (wt > 0.7). Ant 2 wt = 0.034 (wt < 0.3). Ant 4 wt = 0.049 (wt < 0.3). Ant 5 wt = 0.428 (0.3 <= wt <= 0.7). Ant 6 wt = 0.830 (wt > 0.7). Ant 7 wt = 0.960 (wt > 0.7). Ant 3 wt = 0.558 (0.3 <= wt <= 0.7). All done!