A method is a function associated with a class or object. It gives an object behavior alongside the data that describes its state, helping keep related functionality together and making object-oriented APIs easier to use. section 4.1 section 3.2
A Person method
The Person class stores first, middle, and last names. Its full_name() method combines those attributes into a displayable name. Calling p1.full_name() invokes the method for one particular Person instance. The self parameter connects the method to that instance, so separate Person objects retain separate state. section 4.1.1
Methods are useful when several operations work on the same data. Instead of leaving related functions scattered across an API, a class can group them around the state they modify. When a function becomes difficult to understand, refactoring part of its work into smaller methods can produce clearer, more maintainable code. section 4.1 section 3.2.5
Practical method design:
- Give each method one focused responsibility. section 3.2.5
- Use self to access the instance’s attributes and state. section 4.1.1



















