I briefly mentioned in my post titled What is Top-down Design and Stepwise Refinement? about pre-conditions and post-conditions. In this post I want to explain the two essential points in greater detail.
These two principles are one of the keys to being effective in programming.
What are Pre-conditions?
Lets start with the first of the two which is titled pre-conditions. A pre-condition in its most simple form is a condition that needs to be “true” for a method to be called. This means that the method you are calling is expecting something to be in place before or at the point of the method being called. [Read more…]