|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Thing Creature Fly
public class Fly
Fly is a creature that knows how to fly.
Constructor Summary | |
---|---|
Fly(java.lang.String name)
Create a Fly with a name. |
Method Summary | |
---|---|
void |
eat(Thing aThing)
A Fly eats only Things; a fly will not eat anything that is a Creature. |
void |
fly()
When asked to fly, a Fly prints the message '{name} {class} is buzzing around in flight.' (the single quotes are not part of the message.) |
void |
move()
When asked to move, a Fly 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 Fly(java.lang.String name)
name
- -- the given name of this FlyMethod 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 |