![]() |
School of Engineering and
Applied
Science Department of Computer Science CSci 133 -- Algorithms and Data Structures I http://www.seas.gwu.edu/~csci133/spring06 Prof. Michael B. Feldman mfeldman@gwu.edu |
Project #2
Due Dates: Phase I (javadoc and test plan): beginning of class,
Thursday, Feb. 9, 2006
Phase II (full submission): beginning of class, Tuesday, Feb. 21, 2006
This project extends Project 1 and also serves as an exercise in software restructuring. It depends on the readings so far, and also on the handouts Incremental ADT Development with Stubs and Passive and Active Iteration in Collection Classes, which is online and linked from the course page.
The Knight's Tour
program you wrote for Project 1 is a single file, with (perhaps) a few
local
functions and a lot of statement-level code. In this project, you will
distribute much of that functionality into three reusable classes, and
rewrite your Knight's Tour program to take advantage of the reusable
class
structure.
In Project 1, a Knight's Tour is played with data received interactively from a human user.
In this project, you will extend Project 1 so that once a game
begins,
the program will "remember" all valid moves in the
game, and, once the game ends, allow the user to select a "replay"
option that will re-run the latest game. Each actual
move will be displayed in sequence on the board; after each move the
program will wait for the user to press RETURN
before continuing.
Do this project in your csci133 directory; make sure your Project 1 source file is in csci133.
detect the move q0 as a "quit" sentinel to end the current game; when the game ends, ask the user whether (s)he wants to replay the current game play a whole new game, or terminate the program.
Grading will be divided into 5 points for Phase I and 15 points for Phase II.