I have a class that represents a row in a table. I want to add a function that manipulate the data in the row. Where should I add the function?
1) inside the class because it is related to the class 2) outside the class in a separate helper class?
In the past I would have always picked number 1. I am starting to think that number 2 is a better answer, because it separates out logic into its own encapsulated class and reduces complexity of the data class. I am thinking the data class should be left as bare as possible and just contain data members with absolutely no logic.
What is the most agile/best way to do this?