Object invariant
class LinkedList { Link header; … }
class Link { int element; Link next; … }
Object invariant:
header ? null
header.element = 0
size(header.closure(next)) ? 1
Previous slide
Next slide
Back to first slide
View graphic version