I am reviewing this guide on different design patterns. Currently, I am reviewing the Composite Design Pattern. Author provides a graph defining the relationship between different components. When I look at the graph, I notice that the Figure (which presumably is the Interface or Abstract Class) has relationships marked by black and white arrows. The Triangle and Rectangle class are related to the Figure by a white arrow and the Document and Group class are related by a black arrow. Here is a visual representation:
What is the difference between these two color coded arrows?
The white arrow means that there is an "is a" relationship. So Triangle is a Figure. And so are rectangle and group. In java this would mean that Figure is extended or implemented by Rectangle, Triangle and Group.
The black arrow means that there is a composition relationship. So a Document may contain one or more Figures. Similarly a Group may contain zero or more figures.