I would put all the action of a person in the class Person.
If you put all the interaction function in another class it kinds of break a little the concept of object. You will end with a sort of huge library class with a lot of function not related to the library but other class. And imagine if you want to modify a function, you will have to fetch into your huge library class the one function which affect the one class you want to modify. I think it would be simpler to have all the function related to a class in this class
Here, the function haveConversation would be in Person, and would take another Person (the target the actor want to interact with) as a parameter. And forcing him into the action haveConversation.
NavezofMember Since 06 Aug 2013
Offline Last Active Yesterday, 01:44 PM
- Group Members
- Active Posts 154
- Profile Views 2,803
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
Video game, making them and playing them
Music (Cult of Luna, Isis, Rosetta,...)
Anime and Manga
- Website URL http://davidrogerportofolio.wordpress.com/