- Gathering the implementation details together and separating them from the abstration is called encapsulation.
- Data hiding (putting data into the private section of a class) is an instance of encapsulation, and so is hiding function details of an implementation in the private section.
- The public member functions act as go-betweens between a program and an object's private members.
Encapsulation`and Data hiding
最新推荐文章于 2024-06-26 22:42:56 发布