>I am starting to construct more abstract classes and wonder how people are deciding to choose the source of parent for their new classes. If I use a subclass of custom in a 3 tier class hierarchy I would have two choices. If I create the new class in the third app tier, I could subclass either the custom class in the third tier or I could subclass the parent of the custom class in the third tier. I realize there is not much difference here, but since this activity seems that it could become addictive it would be nice to have a consistent method that had some reason to it. Subclassing the third tier custom class actually gives one level more of specialization potential. Is that why it is the best?
Deciding which class should be parent of your new class depends on the functionality of the new class and the relation if bears to its potential parent classes - how much of the parent class functionality does it extend/supercede how much of the parent class functionality is needed etc.
Arnon
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement