Preconditions and Postconditions

Back to Liskov Substitution Principle

Preconditions define what must be true before a method is called; postconditions define what must be true after. A subtype may weaken preconditions (accept more) and strengthen postconditions (guarantee more), but not the reverse.

property lsp contracts