The Concept of Scope
Multiple objects can be instantiated from a single class. Each of these objects has its own identity and state. This is an important point. Each object is constructed separately and is allocated its own memory. However, some attributes and methods may be shared by all the objects instantiated from the same class, thus sharing the memory allocated for these class attributes and methods.
A Shared Method
A constructor is a good example of a method that is shared by all instances of a class.
Although methods generally represent the behaviors of an object, the state of the object is normally represented by attributes. There are three types of attributes: