Class LongLivedSessile

java.lang.Object
  |
  +--Animal
        |
        +--Sessile
              |
              +--LongLivedSessile
Direct Known Subclasses:
Barnacle, Oyster

public abstract class LongLivedSessile
extends Sessile
implements ReproducesbyEggs

abstract class which defines laysEggs() for all long-lived sessile animals


Method Summary
 Set laysEggs()
          method uses random number generator to select how many offspring of long-lived sessile animal survive; current settings are 50% 0 survivors, 50% 1 survivor;
 
Methods inherited from class Sessile
makeMove
 
Methods inherited from class Animal
getAge, getmaxAge, getPrintChar, incrAge, setmaxAge, timeToDie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

laysEggs

public Set laysEggs()
method uses random number generator to select how many offspring of long-lived sessile animal survive; current settings are 50% 0 survivors, 50% 1 survivor;
Specified by:
laysEggs in interface ReproducesbyEggs
Returns:
Set of long-lived sessile animals of one descendent class; an empty Set indicates no survivors