I'm learning object-oriented programming and trying to figure out where an action belongs. A user likes a post, but the like also changes data associated with the post.
Would you put the method on User because it performs the action, or on Post because it owns the like count? What should guide that choice?
not-yet-folded:
A bare count may be enough for a simple example, but it can't by itself tell you whether a particular user has already liked the post.