|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Thing Creature Bat
public class Bat
Bat is a creature that knows how to fly.
Constructor Summary | |
---|---|
Bat(java.lang.String name)
Create a Bat with a name. |
Method Summary | |
---|---|
void |
eat(Thing aThing)
A Bat eats only Creatures in the same way that any Creature eats. |
void |
fly()
When asked to fly, a Bat prints the message '{name} {class} is swooping through the dark.' (the single quotes are not part of the message.) |
void |
move()
When asked to move, a Bat flies. |
Methods inherited from class Creature |
---|
whatDidYouEat |
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 Bat(java.lang.String name)
name
- -- the given name of this BatMethod Detail |
---|
public void eat(Thing aThing)
eat
in class Creature
aThing
- -- what this is told to eatpublic void move()
move
in class Creature
public void fly()
fly
in interface Flyer
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |