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

Lab 7
Last modified: December 01 2010 04:33:31 PM

CSE 113 - Fall 2010 - Lab 7

An Adventure Game - Part 2

This lab is a continuation of the lab you started in Lab 6. Therefore, if your Lab 6 isn't working, you will need to complete it before continuing on to this assignment.

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


Required Lab Tasks

Hero Finds a Flower

If the hero encounters a flower, the hero picks it up. The hero should keep track of how many flowers the hero has encountered and picked up. There must be a method named checkForFlower in your Hero class.

Hero Finds a Gold Ball

If the hero encounters a gold ball, the hero picks it up. Picking up a gold ball causes another gold ball to appear somewhere else in the world at a random location. There must be a method named checkForGoldBall in your Hero class.

Hero Finds a Mushroom

Mushrooms disappear when the hero encounters them. If the hero encounters one mushroom, nothing happens in the program. If the hero encounters a second mushroom, the hero should turn into an animal (visually - that is, change the image) and the hero loses all the flowers he/she has been carrying around. The flowers go back into the world at random locations. If the hero encounters three mushrooms, Skull objects are added to the world at random locations. You should add three skulls to the world. There must be a method named checkForMushrooms in your Hero class.

Modify Behavior for Gold Ball

Picking up a gold ball also allows the hero's image to return to normal.

Hero Finds a Teddy Bear

When the hero encounters a teddy bear, the hero picks up the bear and all the skulls leave the world. If when picking up the bear, the hero has more than one flower, then another teddy bear will appear in the world. There must be a method named checkForTeddyBear in your Hero class.


Submitting the Assignment

Once you have completed your work, you will submit the zipped up version of the Lab 7 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.


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 4.54 points each part.

  1. There is a method named checkForFlower in your Hero class.
  2. There is a method named checkForGoldBall in your Hero class.
  3. There is a method named checkForMushrooms in your Hero class.
  4. There is a method named checkForTeddyBear in your Hero class.
  5. When the hero encounters a flower, it is removed from the world.
  6. When the hero encounters a flower, the hero's flower count is properly incremented.
  7. When the hero picks up a gold ball, another one appears.
  8. Repeat of test 7
  9. When the hero picks up a gold ball, the image returns to be the girl.
  10. Repeat of test 9
  11. When the hero encounters a mushroom, it is removed from the world.
  12. When the hero encounters a mushroom, the hero's mushroom count is properly incremented.
  13. When the hero encounters a second mushroom, the image changes to an animal.
  14. Repeat of test 13
  15. When the hero encounters a second mushroom, she loses all her flowers
  16. Repeat of test 15
  17. When the hero encounters a third mushroom, 3 skulls are randomly placed in the world.
  18. Repeat of test 17
  19. When the hero picks up a teddy bear, all the skulls leave the world.
  20. Repeat of test 19
  21. When the hero picks up a teddy bear, another is added to the world.
  22. Repeat of test 21

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