官术网_书友最值得收藏!

Encapsulation

Encapsulation refers to the hidden nature of an object's data components. We know that the data is there, but cannot access it directly because external entities cannot directly interact with that data:

Inheritance examples

The illustration above demonstrates how a Bicycle class protects its data from external methods and functions. The object's own methods are the only mechanism that can directly view or alter its data.

主站蜘蛛池模板: 奈曼旗| 万年县| 池州市| 白水县| 宁夏| 东乡| 中山市| 安图县| 潢川县| 桐乡市| 扎赉特旗| 新河县| 龙江县| 肇源县| 延边| 西藏| 肇东市| 九寨沟县| 益阳市| 屏南县| 邯郸市| 惠东县| 伊金霍洛旗| 元谋县| 金湖县| 华池县| 临泉县| 喜德县| 齐齐哈尔市| 长治市| 大埔区| 鄄城县| 密山市| 呼和浩特市| 翁源县| 霍州市| 永丰县| 韶山市| 铁岭县| 蕉岭县| 香格里拉县|