Lab 1: MineSweeper

January 22, 2004

Purpose

The purpose of this in-lab is to give you experience taking some preexisting code and modifying it. You will also be asked to provide some JavaDoc comments and practice your Java coding skills.

Partners

You may work with at most one other person on this assignment. If you do, you will both receive the same grade.

Assignment

Create a BlueJ project called lab1. Copy the MineSweeper files (Driver.java, GameBoard.java and Tile.java) from the January 21st lecture into this project.

Make the following changes:

  1. At the end of each game, ask the user if he/she wants to play again. If the answer is yes, let the user play another game.
  2. Add appropriate comments (including JavaDoc comments) to the Driver.java file.
  3. Currently, if the user enters something other than an integer for the row or column prompts (such as banana), a runtime error occurs. Eliminate this runtime error and request the user to enter something valid instead.

Grading

No later than 15 minutes before the lab ends, have either the lab TA or one of the consultants check out your solution. The grading scale will work like this:

Your score will be reported to the lab TA. Nothing needs to be handed in. However, please delete your BlueJ project and empty the recycle bin so that your work is not available for the next lab section. Thank you!

Valid XHTML 1.0!