CS 329: Assignment #2
Due Wednesday, September 16, 2015
The following project is to be done individually.
Project: Tic-Tac-Toe Player, Contracts, and Representation Invariants
Last week, you all presented a mostly-functional Tic-Tac-Toe player. Sadly,
there were bugs. Your job here is to sleuth those out. Specifically, you'll
tackle the failure to display correct player bug by analyzing the ocntracts and
representation invariants of relevant classes and methods.
Code is here: (link)
- For each method that is involved in the display of results (either
directly or because it's called by a method that's involved), you are to
specifiy that method's contract.
- For each class, you are to give a suitable representation invariant.
- For each method that has a contract specified, implement the pre and
post-conditions checks using assert statements.
- Don't forget to include calls to a representation invariant check, too.
Your modified code, plus a brief paragraph or so, describing the cause(s) of
the display bug and a discussion of which contracts/representation invariants
John H. E. Lasseter