Exercise Set 4, question 2 // Chapter 2, Exercise Set 4, Question 2 // Demonstrates initializing direction and color // If you want to initialize all fish to the same // direction and color, use variables as shown with f1, // or individualize the fish as with f2 and f3 Direction dir = new Direction("east"); Color col = new Color(200, 50, 50); Fish f1 = new Fish(env, new Location(2, 2), dir, col); Fish f2 = new Fish(env, new Location(2, 3), new Direction("west"), new Color(100, 150, 50)); Fish f3 = new Fish(env, new Location(5, 8), new Direction("south"), new Color(50, 50, 100)); The modification shown below implements the suggested changes made in this question. Your students may be much more creative with this exercise. for ( int i = 0; i < NUM_STEPS; i++ ) { if (i % 2 == 0) // even numbered step { f1.changeColor(Color.red); } else { f1.changeColor(Color.yellow); } sim.step(); }