CSPP 51090 & CMSC 22001: Software Construction Assignment 5 |
Due: May 4, 2004 |
The goal of this assignment is to improve the error checking and cheating detection of your scrabble adminstrator. These error checks correspond to basic checks on cheating that the administrator and the players in a real game conduct. The terminology of cheating, though, is a notion in the application domain. The purpose of contracts is to catch basic errors in the development of software systems. Presumambly you have protected your portions of the code (via modules or packages) so that the code itself is reasonably safe. We'll ignore issues like raising exceptions, non-termination for now -- the contracts below ensure that the players cannot cheat when following the protocol and ensure some basic guarantees for the players. For some of the contracts, blame for failure lies with the player and for some, blame lies with the administrative infrastucture. For those where blame lies with the administrator, abort the program when a failure is detected. For those where the blame lies with the player, inform the player that they have violated the contract and kick them out of the game, but do not stop the game for any other players. Behavioral Contracts The following invariants govern the interactions in Scrabble:
Sequence Contracts Here are the three primary interfaces with sequence contracts: Implement the sequence contracts in classes that implement these interfaces (one class per interface is sufficient -- you may want to implement the player contracts in the splayer). [5pts] |
CSPP 51090 & CMSC 22001: Software Construction |