Project #2
Due Date: beginning of class, Monday, Feb. 2, 2004
Do this project in your CSci 133 directory!
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 first page of each of the three documents is attached here.
Also attached here is a listing of Stratagem2.java, a
rewritten version of the sample program from Project 1.
The programs133 directory includes Stratagem2.java,
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
- an e-mail message to Prof. Feldman and to Mohamed, containing
your source code for the classes and program, in case we wish to
compile and run
it. Do NOT send an attachment--instead, paste the source code into the
text of the message. The e-mail must be sent before class on
the due date; late submissions will be subject to the usual
20%-per-week "late fee".
Grading:
Grading for this first project will be 0-20 points: program
correctness, 0-16; code style and layout,
0-4.