Design by Contract (DbC) -
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 by Bertrand Meyer. Prentice Hall, 2000.
http://en.wikipedia.org/wiki/Design_by_contract
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment