Add only assertions and invariants that can help


Consider the game for "pass/fail"
A student decided to speed up the play by modifying the rules. He suggests that for each round of the game a student would take out five coins and return back only one.
The rules given were incomplete:
1.a Invent game rules for a game that begins with any number of coins. 
{ }
use rules
Take out 5
Put back 1
{ }
1.b Complete the input assertion and output assertion that will guarantee ONLY that the game will always terminate (does not matter if the student ends guilty or innocent).
Add only assertions and invariants that can help you reason about termination.

1.c Complete the input assertion and output assertion that will guarantee that the student always ends the game passing the class.
Add assertions and invariants that can help you reason about your claim.

1.d Complete the input assertion and output assertion that will guarantee that the student is never fail the class (hint- this is NOT the same as 1.c)Add only assertions and invariants that can help you reason about partial correctness. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Add only assertions and invariants that can help
Reference No:- TGS0141795

Expected delivery within 24 Hours