|
||||||||||
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. |
Methods inherited from class BasicAnimal |
eat, getMealSize, sleep, 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 animalpublic 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 poundsMethod Detail |
public void noise()
noise
in interface Animal
noise
in class BasicAnimal
public 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 |