View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Spring 2006 Programming Assignment 2

Due: Friday, 17 February 2006
This programming assignment builds on the code you created for Programming Assignment 1. You will be adding two new features: tagging and automatic solving. In addition to implementing these two features, you will create SUnit tests for the new features. In the extreme programming (XP) method, you implement the unit tests before implementing the code. That way you can see if your code is working when the unit tests no longer fail. Ideally, you should try to do this. Here are the specifics on the features to be implemented:
  1. Tagging: One thing that often helps players solve Sudoku puzzles is that they tag a certain cell, row, column or region. For example, in Figure 1 (below), the region, column, and row for the 6@4 cell are tagged. That way, you can see what cells are eliminated from being a 9. Your tagging system should be flexible, usable, and useful. You are to create a tagging system that would be useful in having you solve a Soduko puzzle.
  2. Automatic Solving: One of the cool things about being a computer scientist is that you can create programs that do the hard work for you. Sudoku puzzles can be pretty hard. Extend the Squeak Sudoku to solve the puzzles for you (Figure 2). So that you can impress others, your automatic solver should show its progress on the puzzle along the way. The solving strategy should also be smart enough that it can do even the hard puzzles relatively quickly (without going down too many bad branches).

Figure 1
Figure 1: Tagging in Action
Figure 2
Figure 2: Solve the Puzzle Automatically

More Code

Not everyone was able to complete Programming Assignment 1. To allow people to catch up and complete PA2, you can find a solution to PA1 here:
Here are a few chunks of code that may be useful:
[...] fork. "Forks off a process, so that the display will function during the autoSolve."
Processor yield. "Will yield the processor and allow the display to update."
(Delay forMilliseconds: 1000) wait. "Will delay that process for 1 second before resuming."

Grading Criteria

Collaboration Policy

You are not allowed to share your code with others in this class. You can give or receive incidental help (but not code) from others. This is an individal assignment; you turn in your own code. The only exception to this rule is if you want to complete this assignment using pair programming (read this page if you are interested).

Turn-in Site


Links to this Page