public class Herbivore extends Animal { public static final int MIN_NUMBER_OF_PLANTS = 1; public static final int LIFE_SPAN = 20; public void update(Organism[] neighbours) { // first, let's call the method update from the // superclass so that the age is incremented. super.update(neighbours); // counting plants int plants = 0; for (int i=0; i= LIFE_SPAN) alive = false; } public String toString() { return "H"; } }