条款 22:将成员变量申明为 private

    Declare data members private.

    • 切记将成员变量申明为 private,主要基于权限管控和封装性要求
    • protected 并不比 private 更具封装性