edu.pdx.cs399J.lang
Class Animal

java.lang.Object
  extended by edu.pdx.cs399J.lang.Animal
Direct Known Subclasses:
Bird, Insect, Mammal

public abstract class Animal
extends Object

This class is the base class in our animal hierarchy. Each animal has a name and it makes a sound.


Field Summary
protected  String name
           
 
Constructor Summary
Animal()
           
 
Method Summary
 String getName()
          Returns the name of this animal.
abstract  String says()
          Returns the sound that this animal makes.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
Constructor Detail

Animal

public Animal()
Method Detail

getName

public final String getName()
Returns the name of this animal.


says

public abstract String says()
Returns the sound that this animal makes.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2009 Portland State University. All Rights Reserved.