Contracts and Assertions
- slide 21 : 32
An example of a class invariant
The class invariant of a circular lists expresses that the list is circular whenever it is non-empty
Circular list with a class invariant.
A circular list with pre and postconditions