I am creating UML diagrams for others' code, and I encountered something peculiar- a child class has a parent class as one of its member variables, seemingly both a "has a" and an "is a" relationship. Apparently, this is intentional, but even after looking through UML guides, I'm still lost on how to even represent this. Do I only show Inheritance, the stronger relationship? Do I overlay the arrows, creating a solid white arrowhead with a line through it?
With replaced class names in Java:
public abstract class A {
}
public abstract class B extends A {
protected A a;
}
How would I represent this?