|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Thing Creature
public abstract class Creature
A Creature is a Thing that has specific, 'lively' behaviors.
Constructor Summary | |
---|---|
Creature(java.lang.String name)
Create a Creature with a name. |
Method Summary | |
---|---|
void |
eat(Thing aThing)
Creatures may be asked to eat various Things. |
abstract void |
move()
Tell the Creature to move. |
void |
whatDidYouEat()
Make the Creature tell what is in its stomach. |
Methods inherited from class Thing |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Creature(java.lang.String name)
name
- -- the given name of this CreatureMethod Detail |
---|
public void eat(Thing aThing)
aThing
- -- what this is told to eatpublic abstract void move()
public void whatDidYouEat()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |