Exam-style question
Try this first
Which situation best demonstrates functional abstraction?.
- A.A programmer calls a function for a result without needing to know how the result is computed
- B.A programmer writes every computation directly in the main part of a program
- C.A programmer chooses a variable name that describes the data it stores
- D.A programmer copies the same calculation into several different parts of a program
Answer and explanation
Concise answer
A programmer calls a function for a result without needing to know how the result is computed
Why this is correct
Functional abstraction disregards the particular computation method. The function can therefore be used for its result without exposing its implementation.
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.
