Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thoughts on Interface Inheritance
Message
From
24/08/2000 15:29:13
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00408807
Message ID:
00408967
Views:
15
>I'll give it a shot. I'm not a VB expert but.
>Dim Dog1 as IDog
>
>This just creates a new var of type IDog. AFAIK, there isn't an equivalent in VFP

that's what I thought



>Dog1 = createobject("CBeagle") Just create the object.
>
>Doesn't help you much though because the cool stuff happens in the class, not the implementation.

right - so I receive no benefit from the "implemented interface"


>Think of it like this. Create a Class called IDog, with a method Bark. Don't put any code in the Bark method. This would be called an Abstract class. It is NEVER used to create an object, it only purpose is to define the interface for an on object of type DOG.
>
>Now create a class called CBeagle. It already has a method called Bark, And you then just add code to the Bark method. This is the concrete class. It will be used to create an object. It will have all the PEMS of a dog, and could have it's own PEMS in addition as well.
>
>At least that's how I understand it.

yes - I understand the paradigm - just wanted to make sure it was working (or not) like I thought.

thanks!
Ken B. Matson
GCom2 Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform