Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I create a new VCX of subclasses programatically
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142974
Message ID:
00145192
Views:
37
>Having a property or method that is not in the parent class can be indicative of a poor class design. The purpose of the highest class level is to define the public interface for all of its subclasses. Introducing a new property or method down the inheritence tree causes the interface to change within the particular class.

I would say that was a little extreme, Jim. All that's necessary is that the child is-a parent. It's not necessary that a parent is-a child (with respect to interface).

There are two main reasons to subclass: specialization and extension. Both reasons allow adding private/protected properties and methods. The second reason allows adding public methods.

What you're describing is called "class flattening," and can itself be indicative of bad design.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform