001package edu.pdx.cs410J.lang;
002
003/**
004 * This class is the base class in our animal hierarchy.  Each animal
005 * has a name and it makes a sound.
006 */
007public abstract class Animal {
008  protected String name;
009
010  /**
011   * Returns the name of this animal.
012   */
013  public final String getName() {
014    return this.name;
015  }
016
017  /**
018   * Returns the sound that this animal makes.
019   */
020  public abstract String says();
021
022  public String toString() {
023    return getName() + " says " + says();
024  }
025}