Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OOP design
Message
From
06/06/2003 04:46:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
OOP design
Miscellaneous
Thread ID:
00797072
Message ID:
00797072
Views:
52
Hi,
I am developing Inventory control system. In my design, it should able to manage multiple type of product such as normal item (such as cann food), serialno'ism' item (such as electrical ite, mobile device) and matrix item (such as fashion item, clothes).

For these 3 different type of item, there have different/same attributes for example:
normal item : SKU, Barcode
serialno item : SKU, Barcode (may be), serial no, model
matrix item : SKU, BarCode (different colour/size will have different barcode generated), ColourCode, SizeCode, Model

My question is, how to design classes that able to handle these 3 items (ex. while collecting data, display data, validate data) with same interface without DO CASE ...ENDCASE in all around my UI/Business layer?

I used to think about strategy patttern, however, It still seem DO CASE ...ENCASE is required in UI level while collecting/doisplay data.

Any ideas, or example for similar problems?

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...
Next
Reply
Map
View

Click here to load this message in the networking platform