let' describe our current chess set composition and add some attributes to the objects to hold the composite relationshipsposition player +chess_boardboard make move chess set +pieceslist +boardboard piece board +chess_setchessset +chess_setchessset +positionsposition the composition relationship is represented in uml as solid diamond the hollow diamond represents the aggregate relationship you'll notice that the board and pieces are stored as part of the chess set in exactly the same way reference to them is stored as an attribute on the chess set this shows thatonce againin practicethe distinction between aggregation and composition is often irrelevant once you get past the design stage when implementedthey behave in much the same way howeverit can help to differentiate between the two when your team is discussing how the different objects interact oftenyou can treat them as the same thingbut when you need to distinguish between themit' great to know the difference (this is abstraction at workinheritance we discussed three types of relationships between objectsassociationcompositionand aggregation howeverwe have not fully specified our chess setand these tools don' seem to give us all the power we need we discussed the possibility that player might be human or it might be piece of software featuring artificial intelligence it doesn' seem right to say that player is associated with humanor that the artificial intelligence implementation is part of the player object what we really need is the ability to say that "deep blue is playeror that "gary kasparov is playerthe is relationship is formed by inheritance inheritance is the most famouswellknownand over-used relationship in object-oriented programming inheritance is sort of like family tree my grandfather' last name was phillips and my father inherited that name inherited it from him (along with blue eyes and penchant for writingin object-oriented programminginstead of inheriting features and behaviors from personone class can inherit attributes and methods from another class