Post-conditions are sometimes tested using guards or assertions within the code itself, and some languages have specific syntactic constructions for testing
In Design by Contract, the properties declared by the post-condition(s) are assured, provided the software element is called in a state in which its pre-condition(s) were true.
the redefinition (overridden method) returns sorted set, offering more benefit to a client.
the original contract requires returning a set.
Class invariants are inherited, that means,
"the invariants of all the parents of a class apply to the class itself.”
A subclass can access implementation data of the parents, however, must always satisfy the invariants of all the parents – preventing invalid states!