CS 102 (Fall '09)
[Schedule] [Programs] [Notes & Reference] [Examples][Syllabus] [Lab & TA] [Tests] [Grades]

Program #3: Boggle

Prof. Reed, CS 102, Spring '09
Due Monday 10/19 at 2:00 p.m.

Description

Once again write a program in Java to play the game of Boggle, where the user interface should look like the screen shot below:

Screenshot

This time implement the following additional features:

  1. Letters placed on the board must be unique.
  2. All words are checked in a dictionary and must be 3 letters long or more.
  3. A timer gives a maximum of 60 seconds per board configuration.
  4. Implement additional buttons for "Restart" and "Clear". "Restart" zeros out the score and resets the board letters. "Clear" clears the current word letters and allows restarting the current word.
  5. Scoring is based on word length and not just one point per letter. 3 letter words are 1 point, 4 letter words are 2 points, 5 letter words are 4 points, and 6 or more letter words' score is based on the formula: 3 + (number of word letters / 2)
  6. Selecting "Restart" or "Exit" displays all possible words that could be formed from this board.


See the above short YouTube video of what this program looks like when it is running.

You need to know the following concepts in order to write this program:

Everything from the second program, How to use (preferably) Eclipse, objects and classes, implementing a timer (sample code supplied), using a Dictionary class (sample code supplied)

Notes:

  1. See this sample project (zip) for examples of using a timer and looking up words in the dictionary.
    For reference, the separate files are Canvas.java, Square.java, MouseButtons.java, Dictionary.java, Board.java, and the dictionary data which is in dictionary.txt.
    As last time, you shouldn't need to change code except for what is in the Board.java class.
  2. You may use arrays on this program, though you can write it without arrays.
  3. More details to come..

  4. Turnin your program electronically using the "turnin" command from your CS account. You should have already done this once in your first lab. If you missed this for some reason, please look at the web site "Lab & TA Info" page, which links to the content done in the first lab. The turnin command should be used as follows:
    turnin -c cs102 -p prog3 Boggle3
    where the directory containing your solution is called Boggle3.  You may add extra classes, but main() must be in the same file as given in the sample code.

    If you want to verify that your project was turned in, look in the turnin directory for a file with your userid. For instance for this project, from your CS account you would type:
    ls -l ~i102/submit/prog3

You may not email this program. It must be turned in using the turnin command.

[CS Dept] [UIC] [Prof. Reed]