“If you give me a string not beeing null or empty, I will give you a number greater zero” – Pre- and Postconditions made easy.
In the previous part, we found out that pre- and postconditions improve the quality of our code.
Note: I primary announced that part 3 is about writing them down. However, while writing I realized that it is better to split up this part.
Let’s take a look at our sample class first: