I came across two characteristics of encapsulation
- Bundles functions and variables into a single entity.
- Prevents unwanted access to functions/variables by guiding implementation.
I understand that both these characteristics are individually important but I can't figure out if they're related.
Does bundling somehow prevent unwanted access or does preventing unwanted access require bundling?