Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Superclass vs. Subclass structures
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00151975
Message ID:
00152121
Vues:
21
>Do the vehicles not all share;
>
>1) a capacity
>2) the ability to move
>3) a maximum range for movement
>4) a maximum speed of movement
>5) a preparation for movement
>6) requirements for maintenance
>7) etc etc etc

They certainly do. They also share things like

8) Country of manufacture
9) Inventor
10) Paint colors
11) References in literature
12) Number of deaths per year

Whether or not to include any or all of these 12 attributes (and hence whether it's necessary to abstract them) can only be decided when you know why you're creating these classes in the first place. In other words, I think John's question (though provoking an interesting discussion) cannot be answered.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform