Grade 7 · Algebra · Subprograms and Mathematical Models
Reuse Code to Refine a Model
A subprogram packages one useful process so it can be called many times. Mathematical modelling tests whether the process represents the real situation well enough.
The big idea
Reusable logic makes assumptions easier to inspect
A circle-area subprogram can be reused for several cylinders. If the model ignores material thickness or waste, those assumptions remain visible and can be revised.
Work it through
Plan a cylinder-volume program
- 1. Define a circleArea(radius) subprogram that returns 3.14 × radius².
- 2. Call it from volume(radius, height).
- 3. Multiply the returned base area by height.
- 4. Test known inputs, compare with the real object, and revise assumptions or precision.