CSE 113 - Fall 2010 - Banner
  • CSE 113 - Fall 2010
CSE 113 - Fall 2010 - Navigation
CSE 113 - Fall 2010 - Lab 3

Lab 3
Last modified: October 13 2010 09:30:39 AM

CSE 113 - Fall 2010 - Announcements

Little-Crab Scenario (Part 2)

For this assignment, you will work with the little-crab scenario that is discussed in Chapters 3 of the text.

If you don't remember how to do any of the steps (like, copying, zipping, etc), please refer back to Lab 1.

You should continue to work on the same scenario you finished from Lab 2. However, you should retain a copy of your Lab 2 scenario for future reference. In order to do this, go to the file explorer and select the little-crab directory, right-click and select copy. Then, right-click on a blank area of the file explore and select paste. Rename the newly-pasted file little-crab2.

You should leave little-crab2 alone and open Greenfoot with the little-crab scenario you worked on for the last assignment. You should complete the exercises from Chapters 3 in the text. Some of the exercises ask you to do something with the scenario and then change it back. Some ask you to think about the results of doing something. You should do each of the exercises (unless explicitly instructed not to do so below), whether or not it makes a noticeable change in the code. These exercises are designed to get you used to doing things with Greenfoot and to get you thinking about programming. In the end, you will have changed the program in some ways and you will submit the final version. If you miss an exercise that does not cause changes to the program, it is possible that you will not be able to easily do subsequent exercises.

Exercise
Notes
3.1
No changes to the program code for this exercise.
3.2
No changes to the program code for this exercise.
3.3
 
3.4
 
3.5
No changes to the program code for this exercise.
3.6
No changes to the program code for this exercise.
3.7
 
Before going on to 3.8
Place the code shown in Code 3.3 (notice that it spans both pages 34 & 35) into your code for the crab. Make sure the code works as described before moving onto the next exercise.
3.8
 
3.9
 
3.10
 
3.11
No changes to the program code for this exercise.
3.12
 
3.13
 
3.14
No changes to the program code for this exercise.
3.15
 
3.16
 
3.17
 
3.18
 
3.19
 
3.20
No changes to the program code for this exercise.
3.21
No changes to the program code for this exercise.
3.22
 
3.23
** We are working to get speakers installed in the lab. These last three exercises may not be possible if you are only working in 340 and not on your own machine. Therefore, if you can do them, do so. If not, don't. They will not be counted towards the grading of this assignment. **
3.24
3.25

 


Submitting the Assignment

Once you have completed all the exercises in Chapter 3, you will submit the zipped up version of the little-crab scenario.

For directions on submitting, please see here.

Please recall that you must achieve a grade of at least 50% on each of the labs to be allowed to take the second practical exam. This means, that your labs are technically all due by the last day of class (December 10th). However, if you want to stay current with the course, I would recommend having this assignment completed within a week, but definitely before the first practical, which will be during the weeks of October 18th and October 25th.


Grading Information

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.

The following tests were run on your assignment submission. Each test was given equal weight, so 6.25 points each part.

  1. The Crab moves whenever act() is called.
  2. The Crab does not turn randomly or turn at the edge of the world.
  3. The Crab has a separate method that exists for interpretting the user's key requests and processes them accordingly.
  4. The Crab class has a method named (exactly) lookForWorm.
  5. There is a class named Worm in the solution.
  6. When a Crab sees a Worm, it eats it.
  7. Crab plays the sound "slurp.wav" after it has eaten the Worm.
  8. There is a class named Lobster in the solution
  9. Lobsters move whenever act() is called.
  10. The Lobster class has a method named (exactly) turnAtEdge.
  11. Lobsters turn when they reach the edge of the world.
  12. The Lobster class has a method named (exactly) randomTurn.
  13. Lobsters turn randomly left or right up to 45 degrees (so from -45 to 45 degree turns inclusive).
  14. The Lobster class has a method named (exactly) lookForCrab [not lookForWorm].
  15. If a Lobster finds a Crab, the scenario stops.
  16. If a Lobster finds a Crab, the sound "au.wav" is played.

Lab authored by Adrienne Decker

CSE 113 - Fall 2010 - Footer

Page maintained by Adrienne Decker

Contact: adrienne@buffalo.edu | 130 Bell Hall | (716)645-3184