We can also define new types which can hold other kinds of values, for example string used to be considered a type which could hold sequences of characters. A class combines the notions of data with functions to access or manipulate that data. This is because apstring includes not just the characters of the string but functions to create strings and to modify them. It may well be that the distinction between classes and types will disappear in a few years and pure data types will cease to exist as a separate item in computer languages. To repeat a type is a set of values, a class is a set of objects usually containing data and functions .
Objects are to classes as variables are to types.
That is an object is an instance of the class. If you think of a class as a template or a plan, an object is a particular instance or example of that plan. It has its own unique data, and functions which can modify and access that data. The author completes the melding of the two notions class and type by using variables and objects as synonyms. A basic property of an object is that it can be described in terms of its state and its behavior .