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.
In reply to Re: Who am I? Inheritance question
by lima1
in thread Who am I? Inheritance question
by kwaping
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |