J
John Salerno
This is where my OO skills aren't quite honed yet. Some of you might
remember the little game program I was working on for fun. I had several
methods written to determine a character's class, race, etc. My question
is, should I put all those questions in a Character base class (so that
all subclasses inherit them and I can call them straight from the
objects), or should I put them as static methods in a Validator type class?
Which is better? Also, if I did the first choice, how would this affect
the methods that determine whether a character is of a certain class,
assuming that the subclasses themselves are specific for each class?
E.g., wizard class, fighter class, etc. This would mean I wouldn't need
those particular methods?
I'm still trying to wrap my mind around how to organize this kind of stuff!
remember the little game program I was working on for fun. I had several
methods written to determine a character's class, race, etc. My question
is, should I put all those questions in a Character base class (so that
all subclasses inherit them and I can call them straight from the
objects), or should I put them as static methods in a Validator type class?
Which is better? Also, if I did the first choice, how would this affect
the methods that determine whether a character is of a certain class,
assuming that the subclasses themselves are specific for each class?
E.g., wizard class, fighter class, etc. This would mean I wouldn't need
those particular methods?
I'm still trying to wrap my mind around how to organize this kind of stuff!