CS3340:   Intro OOP and Design

 

UML- Useage

 

 

 

  • Usage relationships signify that not only does a client know about the existence of a feature of a server but that it will actually send a message to exercise that feature at some point. Ordinary associations might never be exercised.
    • e.g. The difference between an association and a usage dependency is akin to that between knowing the address of the editor of the Financial Times and being its Wall Street correspondent.
  • Saying that two classes are associated does not imply that the structural link between them will ever be traversed.For example, there may be many relationships in a database that are there to support ad hoc queries that may never be made by any user.
  • A usage link means there will be some interaction or collaboration. One class 'uses' another if it is a client to the other class acting as a server. Any associations introduced may subsequently be replaced by more specific usage or (more rarely) composition relationships. This kind of relationship is also extremely important in requirements engineering and business process modelling.
  • In UML one can use a dependency labelled «uses» to represent the idea.
© Lynne Grewe