"I Spy" or "Where's Waldo" Graphical Quiz Game

Submitted by Kenrick on Sat, 03/08/2008 - 23:10.
Mar 9 2008 - 12:10am
Etc/GMT-8

In this assignment the program displays an image of the student's choice. The user then has to click on the image to find three items. I like to use this after we've covered if-then-else statements and the difference between local variables and class variables. In class I give students a template for how to display an image and get the location of a mouse click so they can complete the assignment earlier in the semester.

The fun part is students select some interesting items for their quiz. I've gotten quizzes to identify parts of a cricket, a human skull, areas of a star, species of fish, and many more.

Assignment: Graphical Quiz

Write a program that shows a picture of something from your field of study and have the user click on at least three items to identify. For example, if you are a medical student, you might show a picture of the brain and ask the user to identify the Cerebellum, Wernicke's area, and Broca's area. In my case, as a computer scientist, I might put up a picture of a computer and have the user identify memory, the power supply, and the CPU.

Add a label to display the user's score. The score should increase by one each time the user correctly clicks on one of the items. The score should not increase if the same item is clicked more than once. Display an appropriate message when all items have been found.

computerIdentify.png