|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Animal | +--MovingAnimal | +--Seahorse
This class provides ability to print H for Seahorse objects, defines makeMove() and laysEggs() for Seahorses
Method Summary | |
char |
getPrintChar()
provides print character for Seahorse object |
Set |
laysEggs()
method for reproducing by laying eggs; always lays 1 egg per reproduction period |
Location |
makeMove(Location myLoc,
World myWorld)
function provides a new Location to which the Seahorse object can move; checks that it moves with the current note: chose to try 8 randomly chosen directions |
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 |
public char getPrintChar()
public Location makeMove(Location myLoc, World myWorld)
public Set laysEggs()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |