Project #2
Due Date: beginning of class, Wednesday, Feb. 9, 2005
This project is an exercise in software restructuring. The Stratagem
program you wrote for Project 1 is a single file, with 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 Stratagem program to take advantage of the reusable class
structure.
The three classes are Position, Move, and Game.
A Position object has two data values, a row and a column. A Move
object has two data values, both of which are Position
objects. And a Game object contains a game board, a
2-dimensional array.
Documentation of these classes, in the form of javadoc pages, is online
in
http://www.seas.gwu.edu/~csci133/documents
The programs133 directory includes Stratagem2.java,
a
rewritten version of the sample program from Project 1, as well as Position.java,
Move.java, and Game.java.
The three class files are all compilable but most of the methods are
written as stubs for you to fill in.
What to submit:
This second project doesn't require a full CSci 53 or 133 submission.
Accordingly, submit printed listing (.txt) files of your classes and
main program, and a test run.
Grading:
Grading for this first project will be 0-20 points: program
correctness, 0-16; code style and layout,
0-4.