Introduction
Methods are functions inside a class. Different types of methods help organize code and control how data is accessed or changed.
When you want a function that works with an object's data.
When you need a function related to the class but not to any one object.
When you want a function that can change or use class-level data.