Preconditions & Design by Contract An important defensive programming technique in Android is design by contract. Examine design by contract and learn how to work with preconditions postconditions and invariants.