Instance Method Configuration

Enter method parameters (e.g., self, param1, param2)
Enter the method implementation logic
Console Output
>

Instance Methods Visualization

Defining Method: get_infoOperation: define

Employee

INSTANCE METHODS
+ __init__(self, name, salary)
+ get_info(self)
+ update_salary(self, new_salary)
+ calculate_bonus(self, percentage)
Method Implementation:
return f'{self.name} works at {self.company}'
Instance: emp1
name"John Doe"
salary50000
Method Call Example
# Creating instance
emp1 = Employee("John Doe", 50000)
# Calling instance method
result = emp1.get_info()
# Output: {self.name} works at {self.company}
Instance Method Characteristics:
First parameter is always 'self'
Can access instance attributes
Called on instance objects
Can modify instance state