Refining a contract -- state responsibilities and obligations
- invariance -- respect the invariants of the base class
- methods -- services may be added or refined
Refining a method -- like improving a business contract
class C : public P {
virtual void m();
}
- pre() pre()
weaken pre-condition
- post() post()
strengthen post-condition