In programming, the methods of a class can be placed into the following three categories:
- A method whose responsibilities is to transform a set of data received as input into a set of data that will serve as input to something else.
- Simple Example: Encrypt method of a MD5Encryption class. CheckOut() Method on a Cart class.
- A method whose responsibilities is to sequence call to one or more dependencies (classes) based on conditions in order to accomplish a certain task.
- Simple Example: ExecuteLogin method on a Login class that determines which AuthenticationProvider to use and then calls it depending on the type of user that is logging in.
- A method whose responsibilities is to perform actions on another system.
- Simple Example: ExecuteNonQuery() method of the SqlCommand class in .Net. Or the ReadFile() method of the File class.