Study Cards on c1, p1, p2
Likewise, if C2 needs to refer to an operation b() in C1, it would use ....?
C2.a1.
Likewise, if C2 needs to refer to an operation b() in C1, it would use C1.b().
If they wish to refer to the properties of each other, they can use .... or ....?
If they wish to refer to the properties of each other, they can use C3.a1 or C1.b().
What technique can we use?
Let us assume that everything is marked visible (+).
To refer to the inner Elements from P1, we need to use the qualified name
If we needed to refer to their features from P1, it would look like P2::C3.a1 or P2::C1.b().
However, we cannot directly refer to C1, because the name C1 is blocked by the existence of a C1 at the P2 level.
Using C1 as the reference would refer to the local C1.
We have to use the ....?
However, we cannot directly refer to C1, because the name C1 is blocked by the existence of a C1 at the P2 level.
Using C1 as the reference would refer to the local C1.
We have to use the qualified name to get to P1’s C1, that is P1::C1. P2 can refer to C1’s properties as P1::C1.b().
Then, every Element in the diagram can refer to ....?
Then, every Element in the diagram can refer to C2 and C3 because these name Elements are defined once, and they are visible by the rules for public (+) Elements.
So the operation on C2 would still be C2.b() whether referred to by something in P1 or P2.
Similarly, the operation on C3 would still be C3.b() whether referred to by something in P2 or P1.
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding

- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding