Exam-style question
Try this first
A programmer uses a stack without needing to know whether it is implemented using an array and a top-of-stack pointer. What does this illustrate?.
- A.Data abstraction
- B.Displaying implementation details
- C.Replacing a compound data object with a primitive type
- D.Preventing new data objects from being constructed
Model answer
What a good answer should say
- Data abstraction
Explanation
Why this works
The use of the stack is separated from the details of how the stack is constructed, which illustrates data abstraction.
Common mistake
No common mistake is linked to this question yet.
