Class Starfish

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

public class Starfish
extends FastMover

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


Method Summary
 FastMover getNewFastMover()
          provides new Starfish object for reproduction function in ancestor class
 char getPrintChar()
          provides print character for Starfish 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 Starfish object
Overrides:
getPrintChar in class Animal
Returns:
char 'S' for Starfish

getNewFastMover

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