The following situation:
I have: a) a super office has n or more main offices has none or more small offices b) all are offices c) the whole structure is twice (preserving the structure) for two business lines d) every office can be a legal representation e) each office can be in a different country
which UML pattern would you suggest
I tried: Composite pattern with leaf office and composite legal rep specializing in main office, super office, small office. Issue: how to represent business line?
Office with self reference (is super of, is main of, is small of) Issue: how to preserve structure for business line?
Composition (three objects super, main, small) Issue: how to preserve structure, and having three non inherited objects for the same seems ugly.
What is your view?
Aucun commentaire:
Enregistrer un commentaire