Class Penguin

java.lang.Object
  extended by Penguin

public class Penguin
extends Object


Constructor Summary
Penguin(double _height)
          Construct a penguin with the given height.
 
Method Summary
 void eatFish(int numHerrings)
          Make this penguin taller, based on how many fish it eats.
 double getHeight()
          Return this Penguin's height (in cm).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Penguin

public Penguin(double _height)
Construct a penguin with the given height.

Parameters:
_height - The height for this penguin, in cm (centimeters).
Method Detail

eatFish

public void eatFish(int numHerrings)
Make this penguin taller, based on how many fish it eats.

Parameters:
numHerrings - The number of fish eaten. Each fish makes it 0.1cm taller.

getHeight

public double getHeight()
Return this Penguin's height (in cm).

Returns:
this Penguin's height (in cm).