Information générale
Catégorie:
Programmation Orientée Object
>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
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