Is this a good example for the difference between abstraction and encapsulation in C++? If not, can you tweak my example in better terms?
Consider a TV. Encapsulation is the internal circuits, LEDS, etc that combine to make it a TV. Abstraction is the on-off, sound, channel setting and other buttons provided to operate it.
- 4 weeks agoFavorite Answer
That sounds pretty good. You may also explain why these are applicable examples (but it would be fine without this).
"Encapsulation is seen in the grouping/delegation of functionality into elements like [...]."
"Abstraction allows for high-level interfaces via [...], which translate human-level instructions to low-level signals the hardware can understand."