Information générale
Catégorie:
Programmation Orientée Object
>#3 and #4 defeat OOP
Again, it all depends. #4 might be entirely appropriate if there was no common interface needed among the classes; i.e. if there was no need to treat Vehicles polymorphically. In the VFP world, we don't descend all classes from a common base class, like they do in Smalltalk.
#3 might well be the best solution, if the concept of moving doesn't need to be treated polymorophically. The concept of "moving" might be too general for a given app.
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