Unit 05 · overview
Unit 5: Loops, Termination, and Iteration Invariants
A loop is not "code that repeats." A useful loop has:
initial state
|
continuation condition
|
work performed
|
state change
|
progress toward termination
This unit makes that model explicit. You will use for, while, and enhanced for loops, but syntax is secondary to proving what changes, what stays true, and why execution stops.