Class Barnacle

java.lang.Object
  |
  +--Animal
        |
        +--Sessile
              |
              +--LongLivedSessile
                    |
                    +--Barnacle

public class Barnacle
extends LongLivedSessile

This class provides ability to print B for Barnacle objects and creates new Barnacle objects for reproduction


Constructor Summary
Barnacle()
           
 
Method Summary
 LongLivedSessile getNewLongLivedSessile()
          provides new Barnacle object for reproduction function in ancestor class
 char getPrintChar()
          provides print character for Barnacle object
 
Methods inherited from class LongLivedSessile
laysEggs
 
Methods inherited from class Sessile
makeMove
 
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
 

Constructor Detail

Barnacle

public Barnacle()
Method Detail

getPrintChar

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

getNewLongLivedSessile

public LongLivedSessile getNewLongLivedSessile()
provides new Barnacle object for reproduction function in ancestor class
Returns:
LongLivedSessile reference to new Barnacle object