Exam-style question
Try this first
A calculation is performed using the values 8 and 5. Which change best demonstrates procedural abstraction?.
- A.Recording only the answer 13
- B.Replacing the calculation with a method that can add any two values
- C.Using larger values instead
- D.Writing down the two input values again
Answer and explanation
Concise answer
Replacing the calculation with a method that can add any two values
Why this is correct
The particular values 8 and 5 have been abstracted away. The resulting method can be applied to other values.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
