Class Cat

java.lang.Object
  |
  +--BasicAnimal
        |
        +--Cat
All Implemented Interfaces:
Animal

public class Cat
extends BasicAnimal

One of several animal types.


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

Cat

public Cat(java.lang.String theName)
Create a new Cat with default characteristics. This constructor sets a default meal size of 0.1 pound and an initial weight of 1 pound.
Parameters:
theName - name of this animal

Cat

public Cat(java.lang.String theName,
           double serving,
           double weight)
Create a new Cat, using supplied parameter values.
Parameters:
theName - name of this animal
serving - the size of a single meal for this animal in pounds
weight - the initial weight of this animal in pounds
Method Detail

noise

public void noise()
Provide this animal with an appropriate voice.

main

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