|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PetList
This class is a collection of animals of various types. It manages the collection by having all the various animals do various things upon request.
Constructor Summary | |
PetList(double food)
This default constructor creates the new animal objects, using the "new" operator and the appropriate constructors. |
Method Summary | |
void |
dine()
Everybody in the set eats a large meal. |
static void |
main(java.lang.String[] args)
This is a simple test harness for this class. |
void |
sleep()
Everybody in the set sleeps it all off. |
void |
snack()
Everybody in the set eats a small meal. |
void |
speak()
This method calls the noise-making method for each animal object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PetList(double food)
food
- total amount of food available in poundsMethod Detail |
public void snack()
public void dine()
public void sleep()
public void speak()
public static void main(java.lang.String[] args)
args
- ignored
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |