If you don't remember how to do any of the steps (like, copying, zipping, etc), please refer back to Lab 1.
For this assignment, you will work on the Practice Assignment 3 scenario, located in /eng/class/notes/cse113/scenarios/PracticeAssignment3. You will need to copy that directory into your account. If you are working from home, you can copy the PracticeAssignment3.zip from the link.
Open the scenario in Greenfoot and notice what classes are available.
First, put a few starfish into the world and one dolphin and press "Run". Note what happens.
In order to complete this practice assignment, you need to make sure the dolphin has the following functionality:
When "Run" is clicked:
The dolphin moves.
The dolphin turns at the edges of the world.
If the dolphin collides with a starfish (note the canSee method inherited from Animal can help us here), then the dolphin should turn some number of degrees.
Once you have finished your changes to the code, you will submit the zipped up version of the practice assignment 3 scenario.
For directions on submitting, please see here.
This practice assignment is due on Friday, March 18th at 11:59:59pm.
Please make sure to look at your grading information on Web-CAT. See the grading information page for more details about how to interpret Web-CAT grade reports. Note that if you do not receive a 100 on the assignment, the information contained in the grading report will point to the problem with your code. There are only three required elements in the final solution:
(1/3 of points) The dolphin moves whenever act is called.
(1/3 of points) The dolphin turns at the edges of the world.
(1/3 of points) The dolphin turns when it collides with a starfish.
Lab authored by Adrienne Decker