in reply to Who am I? Inheritance question
i think good OO design is when the baseclass does not know anything about its childclasses. you should implement the differences in the child classes.
so provide an abstract method in User that the child classes implement. common code can be shared in a private method in user.
or generalize your code for the generic method in User so that this method only requires some member variables that can be set in the childs constructors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Who am I? Inheritance question
by kwaping (Priest) on Mar 16, 2006 at 23:37 UTC |