Question 18
Back to Exercise
Which pairing is correct?
- A Encapsulation: interfaces; abstraction: private data
- B Encapsulation: hiding data and protecting state; abstraction: exposing only essential behaviour and hiding implementation complexity Correct
- C They are the same thing
- D Encapsulation is only for structs
Correct Answer: Option B
They complement each other: an abstract interface (abstraction) implemented by classes with private data (encapsulation).
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!