animals
Class Bunny

java.lang.Object
  extended by animals.Bunny

public class Bunny
extends java.lang.Object

A Bunny rabbit with a name. It eats carrots.


Field Summary
 int carrotCount
          how many carrots total the Bunny has eaten
 java.lang.String name
          Bunny's name
 
Constructor Summary
Bunny()
           
 
Method Summary
 void feed(int numcarrots)
          feed carrots to the bunny
 void hop()
          hop into the air.
 void marchMadness()
          run around like crazy
 void sayHi()
          print a hello message
 java.lang.String toString()
          creates String representing the Bunny whenever a Bunny is implicitly cast to a String println calls this automagically
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Bunny's name


carrotCount

public int carrotCount
how many carrots total the Bunny has eaten

Constructor Detail

Bunny

public Bunny()
Method Detail

sayHi

public void sayHi()
print a hello message


feed

public void feed(int numcarrots)
feed carrots to the bunny

Parameters:
numcarrots - the number of carrots it eats

hop

public void hop()
hop into the air. the height Bunnys hop is determined by how many carrots they ate


marchMadness

public void marchMadness()
run around like crazy


toString

public java.lang.String toString()
creates String representing the Bunny whenever a Bunny is implicitly cast to a String println calls this automagically

Overrides:
toString in class java.lang.Object
Returns:
String representing the bunny