Free practice · multiple-choice · medium

Practice

Decompose a report workflow

A small script validates rows, calculates totals, formats a summary, and writes a file. Which focused units are reasonable? Select all that apply.

Solution architecture

Focused responsibilities create visible data boundaries

Responsibility
One reason for each unit to change
Naming
Business meaning visible at call sites
Scope
Local state by default
Interface
Explicit parameters and returned values
Side effects
Confined to a narrow boundary

A reviewable beginner program separates validation, calculation, formatting, and side effects through explicit parameters and returned values.

Choose all that apply