Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Superclass vs. Subclass structures
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00151975
Message ID:
00152104
Views:
20
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform