Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible to change methods in a Class?
Message
 
À
10/09/1998 11:26:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00135025
Message ID:
00135232
Vues:
9
>So you're saying that you create several different classes with the same methods and properties (but the source or values in those PEMs may be different) and then create an instance of the applicable object?

That's right. Typically, you'd define an abstract superclass that encompasses the range of strategies for a given purpose (such as sorting), define concrete subclasses for each particular strategy (e.g., bubble sort, quicksort), and let clients instantiate whichever one is most appropriate at runtime. (I could give a better example if I knew what the original questioner's needs were).

It's in "Design Patterns."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform