appendix classes ( method is defined as part of class definition( method can only be used with an instance of the class in which it is definedand ( each method header must include parameter named selfwhich must be listed first new in python xall classes are automatically derived from the object base class even if it' not explicitly stated in the header definition constructors all classes should define special method known as the constructor which defines and initializes the data to be contained in the object the constructor is automatically called when an instance of the class is created in pythonthe constructor is named init and is usually listed first in the class definitionclass pointdef __init__selfxy )self xcoord self ycoord data attributes the data contained in an object is known as the object' data fields or data attributes the attributes are simply variableslike any other variable in pythonbut are stored in the object itself an object' attributes are accessed using the dot notation and appending the attribute name to the self reference any variables not prepended by the self reference are local to the method in which they are defined since variables in python are created when they are first assigned valuethe constructor is responsible for creating and initializing the data attributes the constructor of our point class needs to create two attributesone for each of the coordinate components this is done by the two assignment statementswhich create and initialize the attributes named xcoord and ycoord they are initialized respectively to the values of the two parametersx and (note that python also allows default arguments to be defined for methods just as it does for functions object instantiation an instance of user-defined class is created by invoking the constructor this is done by specifying the name of the class along with any required arguments as if it were function call for examplethe following statements create two objects from our point class and assigns them to the variables pointa and pointbpointa point( pointb point(