The user is allowed to encapsulate data and actions into a single object . The data is referred to as the attributes of the object. The actions associated with the data are designed to efficiently manage the new data type. These actions are called methods . Operations that change values in an object.
Selectors can reveal the value of individual attributes.
Like any type, it is a pattern for a structure. The word public means that the members defined in this section are accessible to anyone using the class by declaring a variable of the class type. The members defined following the word private are accessible only to the class's member functions. Member variables and functions defined in public form the interface between the class attributes and its clients. A client is any software that declares variables of the class.