For example, you are able to use your TV set without knowing the details of how it actually works. The methods are used to access and manipulate the data values. Any class member can be declared as either private or public. Private members can be accessed only by other class members.
Public members are accessible to any program that uses the class.
A class member is a function or a data value belonging to a class. A member function that is called automatically whenever a variable of the class is declared. The packaging together of data and the operations that access and manipulate the data. In the context of classes, it means that the class data and implementation details are hidden from the user, making the class easy to understand and preventing the user from inadvertently corrupting the class data.