title: Manage all abstract methods
body: <p>I've created one abstract class named Creature and two classes that extend Creature named Human and Dog. There are also some methods like getAge and setAge, as you can see:</p>
  
  <pre><code>public abstract class Creature {
      public abstract void born(String name);
      public abstract void setName(String name);
      public abstract void setAge(int age);
      public abstract int getAge();
      public abstract String getName();
  }
  
  public class Human extends Creature {
      private String name;
      private int age;
  
      public void born(String name){
          setName(name);
          setAge(0);
      }
  
  // getters and setters
  }
  
  
  public class Dog extends Creature {
      private String name;
      private int age;
  
      public void born(String name){
          setName(name);
          setAge(0);
      }
  
  // getters and setters
  }
  </code></pre>
  
  <p>And then I make this:</p>
  
  <pre><code>private static Creature creature;
  
  String string = new Random().nextInt(2) == 1 ? "Human" : "Dog";
      if (string.equals("Human")) {
          setCreature(new Human());
      } else {
          setCreature(new Dog());
      }
      for (int i = 0; i &lt; 5; i++) {
          creature.born("Name" + i);
      // here are born 5 creatures
      }
      // after one year get all creatures and set their age +1
  </code></pre>
  
  <p>My question is, how can I get all creatures born and after one year set their age with +1?</p>