(Click here for a personal note from Marshall Cline.)
C++ FAQ
/
Section 7
/ FAQ 7.8
Section 7:
7.1
What is a class?
7.2
What is an object?
7.3
When is an interface "good"?
7.4
What is encapsulation?
7.5
How does C++ help with the tradeoff of safety vs. usability?
7.6
How can I prevent other programmers from violating encapsulation by seeing the
private
parts of my class?
7.7
Can a method directly access the non-
public
members of another instance of its class?
7.8
Is Encapsulation a Security device?
7.9
What's the difference between the keywords
struct
and
class
?
[7.8] Is Encapsulation a Security device?
No.
Encapsulation
!=
security.
Encapsulation prevents mistakes, not espionage.