← Java Foundations

Week 4 — Loops

Apr 21 – Apr 25  ·  5 lessons  ·  Labs 8, 9, 10

Objectives

  • Trace while, for, and do-while loops on paper
  • Write the counter, accumulator, and sentinel patterns from English descriptions
  • Choose the loop shape with the three-question decision tree
  • Use nested loops to print rectangular and triangular output
  • Name loop-bug symptoms (infinite, off-by-one, zero iterations) and apply the first check
  • Write one-sentence invariants for counter and accumulator loops