Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class Design Question
Message
De
09/07/2004 13:11:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00922575
Message ID:
00922583
Vues:
20
>In a Visual Class Library, if I wanted to create a class, then subclass it twice,
>and have a method with the same name in both child classes, I would obviously
>create the method in the Parent.
>
>Then all I have to do is open the Visual Class and navigate to the method and add
>any code I want.
>
>But in a Programmatic class, if I want to do the same, create a parent with 2 children
>and have a method called the same in both children, is there any reason to create
>the method in the parent? Why not just create a procedure with the same name in both
>child classes?

The reason for adding the method to the parent isn't just the convenience of having it there, but the notion that if both children need it, it must logically belong to the parent.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform