object modeling...

  • Thread starter Thread starter Herve MAILLARD
  • Start date Start date
H

Herve MAILLARD

Hi,

I made my first steps with oriented object programs and I ask my self a lot
of questions...
Also, I d'ont really know if I post in the rigth Newsgroup...

I have 3 "objects" ?

Equipement, Bloc and Variable

Equipement contains properties : Name, Type
Bloc contains properties : Name, Type, Size
Variable contains property : Name

For one Equipement, I can have X Blocs and for each Blocs, X Variables.
Of course I could have may Equipements.

How can I structurized this ? For exemple I need to know for one Variable
what's the parent's Bloc and Equipement...

I have think to a multi dimensions array ? Is it the good way ?

Your help will be be good...

Thanks a lot

H. MAILLARD
 
The Equipment class should have a collection of Bloc objects. The bloc
class should have a collection of Variable objects.

Depending on how you structure it, you can force Variables to only exist as
part of a Bloc, and that way you could always know who the parent Bloc is.
 
Marina,

Thanks for your answser !

Can you please tell me more about Collections or give me some samples ?

thanks for your help .

H. MAILLARD
 
Back
Top