Search code examples
classumlaggregationclass-diagram

Can aggregation relationship in UML have one to one relationship


Can aggregation relationship in UML have one to one relationship?

Our application is a store billing one. During billing we will provide member id to get him certain discount. So is relationship between member class and billing class a aggregation? If yes, it would it be one to one?


Solution

  • No problem having 1-1 aggregations in UML.

    But you only provide the member id, so why is this an aggregation and not an association? it is not like "the billing class has a member" but more like "the billing class uses a member" or something like that. The member is not a part of the billing class (even a shared part).