G
Grzegorz Stasica
hi,
I've dillema with organizing my classes in my program. The program should
manage materials and their bill of materials (bom). So I've created one
class "Materials" which hold id of the material and ... yes it's bom.
The dillema is should bom object holds both parent code and child code?
How would you solve my problem. The snippet of my code is bellow:
class Material{
int materialid;
BOM bom;
}
class BOM{
Material parentmaterial; //schould I remove it since it's bound to
//the Material
Collection bomitems //collection of BOM Items since material can have
//more component than one
}
class BOMItem{
Material childmaterial;
int quantity;
}
I've dillema with organizing my classes in my program. The program should
manage materials and their bill of materials (bom). So I've created one
class "Materials" which hold id of the material and ... yes it's bom.
The dillema is should bom object holds both parent code and child code?
How would you solve my problem. The snippet of my code is bellow:
class Material{
int materialid;
BOM bom;
}
class BOM{
Material parentmaterial; //schould I remove it since it's bound to
//the Material
Collection bomitems //collection of BOM Items since material can have
//more component than one
}
class BOMItem{
Material childmaterial;
int quantity;
}