public class Bird
{
  protected String commonName;
  protected double aveWeight;
  
  public Bird(String cn, double aw)
  {
    this.commonName = cn;
    this.aveWeight = aw;
  }

  public String getName()
  {
    return this.commonName;
  }

  public double getAveWeight()
  {
    return this.aveWeight;
  }

  public void speak()
  {
    System.out.println("This " + commonName + " emits its characteristic call.");
  }

  public void eat()
  {
    System.out.println("The " + commonName + " enjoys some food.");
  }

  public String toString()
  {
    return "This is an example of a " + commonName;
  }

  public static void main(String args[])
  {
    Bird b1 = new Bird("Robin", 0.5);
    Bird b2 = new Bird("Bluebird", 0.25);
    Robin r1 = new Robin();
    Bird b3 = new Robin();
    System.out.println(b1);
    System.out.println(b2);
    b1.speak();
    b2.eat();
    b3.eat();
    r1.fly();
  }
}
    
