Marine Biology Case Study Files

MCX1 home    MCX2 home

Instructions: If you plan to work in a C++ environment other than the one provided by the school's network, you will need to obtain the files that support  the AP classes and the Marine Biology case study. These files are designed to work when they are located in the directory or folder in which you compile your C++ programs. Read the instructions for integrating the files that you download with your programming environment at home at Skylight Publishing's web site: Setting up C++ compilers for AP Comp Sci. Skylight's AP Review book will be used in this course.

Marine Biology Case Study files: Part 1

See Skylight's Setting up C++ compilers for AP Comp Sci for instructions on how to integrate these files into your C++ programming environment.
1. Create a directory (APmarine, we'll assume) for the files you will download
     a
.
Copy all the AP class files to this directory
2. Download the files to the directory you created in step 1
    
Download one zip file (and unzip in APmarine) or download files individually: download page
 
3. Building the Part I case study programs on your home computer
    

COMMAND

DESCRIPTION   

1. cd APmarine
2. g++ aquamain.cpp  aquafish.cpp randgen.cpp
3.  ./a.out     (./a with Cygwin)    
1. Changes to APmarine directory
2. Builds the aquamain.cpp program*
3. Executes the aquamain.cpp program
4. g++ sixflips.cpp aquafish.cpp randgen.cpp
5.  ./a.out     (./a with Cygwin)    
4. Builds the sixflips.cpp program*
5. Executes the sixflips.cpp program
 
*
with the 1998 edition of GNU Software for Windows CD-Rom Edition 1, replace g++ with gxx
4. Building the case study program on your school account
     After logging on, enter this sequence of Linux commands. Remember that Linux is case sensitive!

COMMAND

DESCRIPTION   

1. cd
2. mkdir APmarine  
3. cp  /usr/local/classes/MCX1/jaye/91-APmarine/*  ~/APmarine  
1. Changes to default directory, if necessary.
2. Creates a directory (folder) with the name APmarine
3. Copies all the required files to your APmarine directory
4. g++  aquamain.cpp  aquafish.cpp randgen.cpp
5. ./a.out     
6. g++ sixflips.cpp aquafish.cpp randgen.cpp
7.  ./a.out     (./a with Cygwin)   
4. Builds the aquamain.cpp program
5. Executes the aquamain.cpp program
6. Builds the sixflips.cpp program
7. Executes the sixflips.cpp program

 

Marine Biology Case Study files: Part 2

See Skylight's Setting up C++ compilers for AP Comp Sci for instructions on how to integrate these files into your C++ programming environment.
1. Download the files to the appropriate directory (APmarine)
     a.
Download one zip file partii.zip  and unzip them in APmarine or...
    b. Download Part II files: individually as instructed.

    c. Download Makefile (Linux  or Cygwin) or Makefile98 (1998 version of GNU's Software for Windows)
    d. If you use the 1998 edition of GNU's software for Windows, you will need to replace the fish.cpp and nbrhood.cpp files you just
            downloaded with with slightly emended versions or the Part II program won't compile properly.       
         1. Download emended fish.cpp
         2. Download emended nbrhood.cpp
2. Building the Part II case study program on your home compute*

COMMAND

DESCRIPTION   

1. cd APmarine
2a. make
2b. make -f Makefile98     
3.   ./fishsim  
1. Changes to APmarine directory
2a. Builds the case study program fishsim (Linux, Cygwin)
2b. Builds the case study program fishsim (1998 GNU software for windows)
3.   Executes the program

 

MCX1 home    MCX2 home