General information
Category:
Object Oriented Programming
To quote Grady Booch, it depends on the application. :)
However, some general comments can be made, I guess. I think we'd all try to avoid 1), since that would mean modifying the base class every time a new method of locomotion was introduced. 4) would not be suitable if in fact there was common functionality for Vehicles in the app. The choice between 3) and 4) would depend on who is moving the objects, and why. If you were simulating city traffic patterns, e.g., then you might not actually care how the moving was done, you just know that every cycle, everything needs a chance to move itself.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only