Question #276568


Define "precondition" and "postcondition" as part of your description


Expert's answer

A precondition is a predicate that should hold upon entry into a function. It expresses a function's expectation on its arguments and/or the state of objects that may be used by the function.

 

A postcondition is a predicate that should hold upon exit from a function. It expresses the conditions that a function should ensure for the return value and/or the state of objects that may be used by the function.


LATEST TUTORIALS
APPROVED BY CLIENTS