1. Preconditions should not be strengthened in a subclass, and
2. Postconditions should not be weakened in a subclass, and
3. Invariants should not be weakened in a subclass.
References:
Object-Oriented Software Construction
http://en.wikipedia.org/wiki/Design_by_contract
No comments:
Post a Comment