封装

1.修改属性的可见行;

2.创建公有的getter()  setter()方法;

3.在方法中添加属性控制语句。

原文地址:https://www.cnblogs.com/YeHuan/p/10567004.html