|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--BasicAnimal
|
+--Cat
One of several animal types.
| Field Summary |
| Fields inherited from class BasicAnimal |
currentWeight, mealSize, name |
| Constructor Summary | |
Cat(java.lang.String theName)
Create a new Cat with default characteristics. |
|
Cat(java.lang.String theName,
double serving,
double weight)
Create a new Cat, using supplied parameter values. |
|
| Method Summary | |
static void |
main(java.lang.String[] args)
Run this animal through a typical day. |
void |
noise()
Provide this animal with an appropriate voice. |
void |
sleep()
Provide this Cat with a way to rest when weary. |
| Methods inherited from class BasicAnimal |
eat, getMealSize, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Cat(java.lang.String theName)
theName - name of this animal
public Cat(java.lang.String theName,
double serving,
double weight)
theName - name of this animalserving - the size of a single meal for this animal in poundsweight - the initial weight of this animal in pounds| Method Detail |
public void noise()
public void sleep()
sleep in interface Animalsleep in class BasicAnimalpublic static void main(java.lang.String[] args)
args - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||