Software Construction Assignment 5: Contracts
|Due: April 25, 2017 @ 5pm. Please include a README.txt that has both partner's names and email addresses.|
For this assignment, you should add contracts to your Parcheesi implementation.
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 (if possible) and kick them out of the game, but do not stop the game for the other players.
The following invariants govern the interactions in Parcheesi:
Here are two of the primary interfaces with sequence contracts:
Your own contracts
As we discussed in class, contracts belong at key interfaces in the program. The above contracts protect the administration of the game from the players (and vice-versa). Find another place in your own organization of your program that would benefit from contracts and work our some contracts to add to it.