Class Shrimp

java.lang.Object
  |
  +--Animal
        |
        +--MovingAnimal
              |
              +--FastMover
                    |
                    +--Shrimp

public class Shrimp
extends FastMover

This class provides ability to print R for Shrimp objects, creates new Shrimp objects for reproduction, and initializes speed field for Shrimp objects


Method Summary
 FastMover getNewFastMover()
          provides new Shrimp object for reproduction function in ancestor class
 char getPrintChar()
          provides print character for Shrimp object
 
Methods inherited from class FastMover
laysEggs, makeMove
 
Methods inherited from class MovingAnimal
getDirection, getSpeed, setSpeed
 
Methods inherited from class Animal
getAge, getmaxAge, incrAge, setmaxAge, timeToDie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPrintChar

public char getPrintChar()
provides print character for Shrimp object
Overrides:
getPrintChar in class Animal
Returns:
char 'R' for Shrimp

getNewFastMover

public FastMover getNewFastMover()
provides new Shrimp object for reproduction function in ancestor class
Overrides:
getNewFastMover in class FastMover
Returns:
FastMover reference to new Shrimp object