|
Inhertiance, Aggregation, and Attributes
inheritance, aggregation, and attributes...what happens?
A systems engineer is writing this, so I will apologize right away.
Assume:
Class A has data attributes of a1 and a2.
Class B has data attributes of b1 and b2.
Class C has data attributes of c1 and c2.
C is an aggregate of A.
B is a child of A.
So I tend to think of A as really including a1, a2, c1, and c2 from a data perpective.
Now, I know B (from a data perspective) includes a1, a2 (from inheritance), b1, and b2. My question is does it also include c1 and c2 (due to A's aggregate relationship to C)?
OR, is the correct way to show that B "includes" c1 and c2 is by making C an aggregate of B too, in addition to A?
I included a diagram.
Thanks!
|