Can a composition be bi-directional so that both classes know about each other?
And if not, what is the default direction of the composition?
Yes, the composition does not add limitations to the navigation ability of the association. More information on the differences between Accociation, Composition and Aggregations can be found here: UML Composition vs Aggregation vs Association
A- > B , B A. A B, ,
().
( OMG TM (OMG UML) - .109)
. .
, , B , A . , . , , UML, . . .
, , , B , A B.
, shared aggregation ( ) , , UML.
shared aggregation
https://www.lucidchart.com/pages/uml/class-diagram:
. . Car RoadTrip . "assignCar" 0..1, , RoadTrip , , , . , RoadTrip , , Caravan 0.. *. Car "getRoadTrip", , - 0.. *