Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Superclass vs. Subclass structures
Message
From
28/10/1998 19:01:08
 
 
To
28/10/1998 17:15:54
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00151975
Message ID:
00152043
Views:
18
Of the four, I've gone with #2. But, I'm interested in the analogy.

Why is move a method of the superclass or subclass? After all, they don't just pick and go themselves. Pilots taxi airplanes, those little carts tow them on to the tarmac. People, and robots basically drive cars (roll their wheels) but they also often float down our ditches. Rowboats can be moved through portage, towed, rowed, motored... What do you do if you have a rowboat and stick a parasail on it?

So I'd argue that these vehicles know about themselves but something else acts on them. Flying is a primary/preferred locomotion method, but you limit the class, it seems to me, if you set it at the subclass level.

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!

BTW, ya'll are invited to next spring's Albuquerque Rio Grande Great Boat Race...where there are some constructs floated that you simply would not believe!

...snip

>2) The Vehicle supports a Move method. The subclass defines Move as appropriate and returns a value indicating it flew,drove, or was rowed.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform