Exam-style question
Try this first
A programmer uses a function to obtain a result but does not need to know which computation method is used inside the function. Explain why this is an example of functional abstraction. Also explain what would be missing if the abstraction only produced a procedure.
Answer and explanation
Concise answer
It is functional abstraction because the programmer uses the result of the function without needing to know the particular computation method used to produce it.
Why this is correct
The answer should connect the user's independence from the implementation method with functional abstraction. It should also distinguish this from procedural abstraction, whose result is a procedure.
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.
