Exam-style question
Try this first
A function is replaced by a different computation method, but programs that use it still receive the expected result. Which conclusion is most appropriate?.
- A.The function still provides functional abstraction because its particular computation method remains hidden
- B.Functional abstraction has been removed because the computation method changed
- C.The function has become a procedure because its implementation was changed
- D.The function is no longer an abstraction because it produces a result
Model answer
What a good answer should say
- The function still provides functional abstraction because its particular computation method remains hidden
Explanation
Why this works
Functional abstraction is concerned with hiding the particular computation method. Changing that method does not remove the abstraction if the caller still uses the function without depending on the method.
Common mistake
No common mistake is linked to this question yet.
