Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is polymorphism?
Message
De
24/03/1999 17:45:11
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00200864
Message ID:
00201656
Vues:
18
Nope. This is simple inheritance all the way. Multiple inheritance means that if A derives from B and C, than A inherits all the properties and methods from B and C. Ie: If B has a method called BMethod and C has a property CProp, then A has also a BMethod method and a CProp property. It also means that one can override in A any method from B or C. This is not possible in VFP.

But things get more complicated when B and C have properties and/or methods with the same name. Another nice thing is when two or more of the base classes have in their inheritance tree a common class. Like:
   D
  / \
 /   \
B     C
 \   /
  \ /
   A
Etc.

Vlad

>I am not arguing, just pointing out that if you create a class (called TestClass) that has a container (based on a container class) and other objects (for instance, 2 buttons based on a button class) and the parent container class' proterties are changed, those changes are inherited into the TestClass class. If you change properties in the parent button class, those changes are inherited into the TestClass class also. So this TestClass class does inherit properties from two classes.
>
>Joe
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform