In other words, if any assertion evaluates to false, we consider the software system invalid or broken. However DBC takes assertions a zillion levels further. Preconditions Postconditions Invariants Let's examine each in more detail. Preconditions Preconditions specify conditions that must hold before a method can execute. As such, they are evaluated just before a method executes.
Preconditions involve the system state and the arguments passed into the method.
Preconditions specify obligations that a client of a software component must meet before it may invoke a particular method of the component. If a precondition fails, a bug is in a software component's client. In contrast, postconditions specify conditions that must hold after a method completes. Consequently, postconditions are executed after a method completes. Postconditions involve the old system state, the new system state, the method arguments, and the method's return value.