|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The individual creatures in the world are all representatives of some species class and share certain common characteristics, such as the species name and the program they execute. Rather than copy this information into each creature, this data can be recorded once as part of the description for a species and then each creature can simply include the appropriate species reference as part of its internal data structure.
Method Summary | |
java.lang.String |
getColor()
Determine the color of this Species. |
java.lang.String |
getName()
Determine the name of this Species. |
int |
getProgramSize()
Determine the number of instructions in the Program for this Species. |
Instruction |
getProgramStep(int aStep)
Determine an Instruction from the Program for this Species. |
Method Detail |
public java.lang.String getColor()
public java.lang.String getName()
public int getProgramSize()
public Instruction getProgramStep(int aStep)
aStep
- the step number for the Instruction. 1 <= aStep <=
getProgramSize().
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |