0% completed
Confused by what uni-directional really mean...
Adrien
Aug 7, 2023
The description of uni-directional versus bidirectional association is confusing to me. You wrote:
• By contrast, in a uni-directional association, two classes are related - but only one class knows that the relationship exists. In the below example, only Flight class knows about Aircraft; hence it is a uni-directional association
But on the class diagram we see that Aircraft has a getFlights() method which seems to contradict this statement. Similarly the association between Airport and Flight is annotated as "Uni-directional" but we see that Airport has a getFlights() method and that Flight has some Airport-typed properties.
1
0
Comments
Adrien 2 years ago
To clarify: I understand we're not talking about simple dependencies between classes but here it's unclear why the association between Flight and Airport would not be described similarly to the FlightInstance and Crew one: i.e we could describe the Airport as "assigned"...
Raphael Reinauer2 years ago
The difference between the association of Flight and Airport to Airport and Flight is that the Flight class has two attributes that associate it with the Airport class:
departureAirportof typeAirportarrivalAirportof typeAirport
On the oth...