Stencil print plans underestimate the area of enlarged patterns
Level 1 · node · Correctness · Dimensional calculation error from applying a linear scale to planar area
Scenario
A fictional stencil printing workshop estimates printed paint coverage using each pattern's original painted area and enlargement or reduction factor. The estimate is correct at original size, but doubling both width and height produces a reported area smaller than the actual painted area. Review the area calculator and the print plan list.
Requirements
Each pattern contains name, area (a nonnegative finite area), and scale (a positive finite linear scale factor). The same factor applies to width and height. plan returns each pattern's name and printedArea, the area after printing, in input order. Do not modify the input. Tests use exactly representable numbers.
Acceptance criteria
- Preserve the correct printed area for original-size and zero-area patterns.
- Calculate the correct printed area when both width and height are enlarged or reduced.
- Preserve input order and pattern names without modifying the original array or its entries.