Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple question to ask for opnion
Message
De
14/06/2002 12:18:31
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Simple question to ask for opnion
Divers
Thread ID:
00668612
Message ID:
00668612
Vues:
52
hi,
I am beginner of OOP. I have 3 classes, datasource, validator and busines class. Business object instance will have a property that reference to datasource object and also another property to reference validator object.

I am confusing on where should I place the method. I need to create a class that add/update/delete staff record. Therefore, I will create an instance of business class. Business Class will create an instance of datasource and validator object by default. Now, if my program want to calculate staffs' commission, I may need to access staff, sales, sales details at the same time.

Where should I place this function, business class?
Since, I need to access at least 3 tables, should I create 3 instance of datasource, or 3 instance of business class??

How is your design?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform