Class Dog

java.lang.Object
  |
  +--Animal
        |
        +--Mammal
              |
              +--Dog
All Implemented Interfaces:
Noisy

public class Dog
extends Mammal

A class for dogs. A dog is a mammal that makes a "Bark" noise and travels on four legs.

Since:
JDK1.2

Constructor Summary
Dog(java.lang.String name)
          Creates a dog.
 
Method Summary
 java.lang.String getNoise()
          Gets the noise made by a dog.
 
Methods inherited from class Mammal
poke, toString
 
Methods inherited from class Animal
feed, getName, getWeight, poop, sleep, wakeup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dog

public Dog(java.lang.String name)
Creates a dog. Dogs weigh 10 kilograms, eat dogfood, and travel on four legs.

Parameters:
name - the dog's name ("Fido", "Lester", etc.)
Method Detail

getNoise

public java.lang.String getNoise()
Gets the noise made by a dog. Dogs go "Bark".

Returns:
the noise