class TestNature {

TestNature () {
  Elephant jumbo = new Elephant ("Elephant",350,1.2);
  Rhino mafuta = new Rhino ("Rhino", 200, 0.75);
  System.out.println (jumbo);
  System.out.println (mafuta);
}

public static void main (String [] args) {
  new TestNature ();
}

class Nature {
  protected String name;

  Nature (String n) {
    name = n;
  }

  public String toString () {
    return name;
  }
}

class Animals extends Nature {
  Animals (String n) {
    super (n);
  }
}

class Herbivores extends Animals {
  protected int grassneeded;

  Herbivores (String n, int g) {
    super (n);
    grassneeded = g;
  }
}

class Elephant extends Herbivores {
  private double tusks; // their length
  Elephant (String name, int weight, double length) {
    super (name, weight);
    tusks = length;
  }
  public String toString () {
    return name+"  "+grassneeded + "  "+tusks;
  }
  }

class Rhino extends Herbivores {
  private double horn; // its length
  Rhino (String n, int w, double l) {
    super (n, w);
    horn = l;
  }

  public String toString () {
    return name+"  "+grassneeded + "  "+horn;
  }
  // and more on rhinos
}

}
