This lab has three purposes:

Please consult the handout Design Guidelines for big-bang Programs.

Start of lab

Begin by reviewing the design handout mentioned above and the circle-drawing program from last time. To review the program, run

  drracket /comp/50/www/solutions/lab-circles.rkt

and look over the code. If you have questions, ask the course staff.

Managing the design process

In this lab you will be building a big-bang program. Please check in with the lab staff at the following points:

  1. When you have drawn scenes from the program
  2. When you have written a data description for world states
  3. When you have a wish list for functions (including signature, purpose statement and header for each function)
  4. When you have a tested implementation that you are ready to refine


You will be developing a game of Whack-a-Mole:

Design requirements:

Domain Knowledge: Calling (random n), where n is an exact integer, returns a nonnegative integer less than n. All candidates are chosen with equal probability.

Design refinements

Real programs evolve over time. Here are some suggestions for refining your program:

Required refinement: Whack-a-mole with Jumbos

Change the game so that on rare occasions, what pops up is not a mole but Jumbo. If a player clicks on Jumbo, the player loses 10 points.

What to submit

Ten minutes before the end of the lab, put the following text at the beginning of a DrRacket file. Use the source code you have been working on:

What I did during this lab:
   (you fill in this part)

What I learned during this lab:
   (you fill in this part)

The lab staff will help you articulate what you learned.

Finally, submit this file through the handin server as lab3. You will need to submit it using two usernames connected by a + sign, as in


You submit using Jane Doe’s password.