2
I am in doubt about how it would be the best way to represent an entity named client that may have sub-layers of the same entity.
Customer may own another Customer who is actually a carrier, and that Transposer may own another Customer who is a broker.
I thought about creating extended classes Cliente < Transportador < Corretor
, since they all have basically the same attributes.
I’ve done a lot of this in Java but a rubista friend once told me he hated this kind of practice.
Below follows the structure and class diagram I thought of creating.