HW4 Answers
Comments:
<src> directory is the directory that contains all the java source code for devsJava project.
Atomic Model (preyPredator.java)
The description of
the solution has been given in the previous solution (HW3 Answers). As this is
the java code for the same solution, it should be understood with respect to
HW3 Answer.
In this java
implementation, apart from the usual functions of initialize(), deltext(),
deltint(), deltcon() and out(), a
new function getTooltipText() is introduced. This function is very useful
in showing the information contained in various variables inside the atomic
model, when the mouse is brought over the particular atomic model. Its an “atomic”
library function. As a result super.getTooltipText() is called to print the default values like modelName, phase, sigma, tL and tN. This method returns a String. So any other
information that needs to be displayed is concatenated as String to this default
display.
In this particular
example, Values of prey and predator are added to the
default String.