Introduction
Methods let us attach actions to specific data types. This helps organize code and makes it easier to work with related data and behavior together.
When you want to group functions that work on the same type of data.
When you want to change or use data inside a struct easily.
When you want to make your code clearer by showing what actions belong to what data.
When you want to reuse code by calling methods on different values of the same type.