# Marine Biology Simulation

### Information on compiling and running the Marine Biology Simulation using Metrowerks CodeWarrior:

There are several Metrowerks CodeWarrior projects in this folder. The projects whose names end with "`LE2`" work under Learning Edition 2, those whose names end with "`LE3`" work under Learning Edition 3, and those whose names end with "7" work under CodeWarrior 7 (IDE 4).

For each version of CodeWarrior, there are two project files.

       OrigFish      Compiles with the original Fish class (Chap 1 & 2)
       DynPop        Compiles with the breeding and dying Fish class
                           from the DynamicPopulation folder (Chap 3)

Copy the two project files corresponding to the version of CodeWarrior you use to the `Code` folder (under the `JavaMBS` folder).

Each`` project each contain three targets.

       Full GUI             Uses MBSGUI as the main class (Chaps 1 - 5)
       Simple Demo 1        Uses MBSSimpleDemo1 as the main class (Chap 1)
       Simple Demo 2        Uses MBSSimpleDemo2 as the main class (Chap 1)

To choose a target, click on the Current Target pull-down menu in the upper-left corner of the project window (with the little icon of an arrow pointing to a target). Then click on the name of the desired target. When you run the program (by clicking on the green Run arrow or by choosing Run from the Project menu), the program will use the appropriate main class. If you create a new main class (by copying `MBSSimpleDemo1`, for example), you can make that the main class for a particular target. Open the Target Settings window by clicking on the Target Settings icon (the one with the yellow and black strip just to the right of the Current Target pull-down menu) or by selecting Edit > TargetName Settings from the menu bar. Then click on Java Target under the Target heading in the left panel. Type the name of your class (not the file name) into the Main Class field, then click Save or OK. See the online CodeWarrior help for more details.

When you go to open an environment data file, the file chooser window will come up in a project folder, which is the program's current folder during execution. You will need to go up to the `JavaMBS` folder (which may be several levels up) and then down to the `DataFiles` folder to find the initial configuration files.