What is the difference between function and method?
 Function is C language term, it refers to a piece of code and the function name will be the identifier to use this function. Method is the OO term, typically it has a this pointer in the function parameter.A function has another property: all calls to a function with the same parameters, should return the same result. A method, on the other hand, is a function that is related to an object in an object-oriented language. 