How to determine object responsibility?

Right now I'm working on a project that requires its own custom registration/authentication system and it got me thinking about object responsiblity and OO design.

I'll pose this question and see what kind of opinions everyone has.

I have a "User" class with the usual properties - first name, last name, email, etc.etc.

Should my User class have a method named "Register" where the User object is responsible for knowing how to register itself - OR - should I have a 'Register' method in say, some kind of security class that accepts a User object and uses the property values to register the User? I've abstracted all the direct DB interaction code into a data access library but where the Register method belongs - in terms of good standard OO design - still has me thinking. I might have to dig up my copy of "Object Thinking". It's been a while since I read it but I remember it having good stuff on topics like this.

What do you think the right design is?


Comments have been disabled for this content.