Class PetSet

java.lang.Object
  |
  +--PetSet

public class PetSet
extends java.lang.Object

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.


Field Summary
(package private)  Cat catA
          first Cat
(package private)  Cat catB
          second Cat
(package private)  Dog dogA
          a Dog
 
Constructor Summary
PetSet()
          This default constructor creates the set of animal objects, as specified in the homework writeup.
 
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()
          Everybody make some noise, it's time to get a move on!
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

catA

Cat catA
first Cat

catB

Cat catB
second Cat

dogA

Dog dogA
a Dog
Constructor Detail

PetSet

public PetSet()
This default constructor creates the set of animal objects, as specified in the homework writeup.
Method Detail

dine

public void dine()
Everybody in the set eats a large meal.

main

public static void main(java.lang.String[] args)
This is a simple test harness for this class.
Parameters:
args - ignored

sleep

public void sleep()
Everybody in the set sleeps it all off.

snack

public void snack()
Everybody in the set eats a small meal.

speak

public void speak()
Everybody make some noise, it's time to get a move on!


Generated by BlueJ