Code Elements Exercise

 

Label the following parts in the code sample provided by your instructor.

1. Circle the class definition/declaration
2. Box in any methods
3. Label all variable declarations
4. Star in the constructor for this class
5. Add comments to each closing curly brace } indicating what it is closing
6. Which method is never used?
7. What happens when 8 worms are eaten?
8. What happens anytime a worm is eaten?
9. What two keys control the crab in this game?
10. There are several errors in this code - write in the corrections for the code. How many errors did you find?
11. Describe what this game does.