common understanding btwn user,developer about what will happen before and after code executes preconditions true -> method called correctly method will behave as expected method promises to meet the postconditions preconditions false -> code can do.... whatever crash unexpected result might still work what is "allowed" to be a precondition? what makes a good precondition? if it's called only from another function that does its own error checking, maybe it's ok if the caller can check for it whose fault is it when a precondition is NOT met? usually the caller, unless they don't have enough information to tell ahead of time whose fault is it when a postcondition is NOT met? the developer of that component how do we ensure that this doesn't happen? assertions - can turn off after testing when they occur, nothing we can do "fail-fast" - crashing early is good exceptions - always on can be "caught" why turn assertions off? helpful feedback for developer, not user slow down execution of app invariants conditions that are always true for every object of a type for its entire lifetime - predict an object's behavior enforcing invariants author of the class/module if outside coder tries to violate invariant crash (Exception) if inside coder violates invariant can be broken temporarily while inside a method check for that using assert statements