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:
00152104
Vues:
21
>>In one way, I guess, move is function of some other kind of object (say a people-object). God, help me before I get even more lost in this analogy!
>
>:)
>
>But in my traffic simulator example, it wouldn't be important who did the moving, since all you want to simulate is how the vehicles themselves interact with each other. You would indeed be treating the vehicles as moving themselves.

Mark,

Also the use of a consistent interface is helpful, in your traffic example, when there may be more than one driver class to control the automobiles. perhaps you need a taxi driver, a teenage driver, a race car driver etc. If each one had to talk to its vehicle in a different way then you would preclude any kind of generic code in the driver classes because there was no consistent interface to the vehicles.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform