Explorer
class (cont.)
n
Method
takeHit
:
u
require:
F
hitStrength >= 0
u
ensure:
F
this
.stamina() <= old.stamina()
F
n
“old” refers to the value of the
variable at the beginning of the
method; it is not a Java construct.