We break down how the
init-block works in Kotlin: when it runs, how to use it to normalize input (
trim(),
lowercase()), prepare derived properties (for example,
summary), enforce invariants via
require(...), and how to read the execution order of multiple
init-blocks. At the end: typical design mistakes and practical advice for console applications.