How to present use-case generalization into class diagram?

Viewed 140

I have a use-case diagram which includes a use-case that is a parent and three children use-cases that share the common behavior of the parent but each child adds something more at its own.I have to convert use-case diagram into class diagram.My question is:

Is it necessary to present generalization into the class diagram if the use-cases diagram include use-cases that uses inheritance?

Can I do the class diagram without the inheritance ?

2 Answers

Is it necessary to present generalization into the class diagram if the use-cases diagram include use-cases that uses inheritance?

necessary : no

There is no link between the possible inheritences of UC and possible inheritences between classes, for the simple reason that generaly there is no link between UC and classes

Can I do the class diagram without the inheritance ?

yes you can have classes without inheritance, but again no link with the UCs

I agree with Bruno’s answer. I would nevertheless like to mention a special case, for the records.

In some methodological contexts, such as the Unified Process, there is a practice to derive in the analysis the classes from the use case by using the Entity-Control-Boundary approach. In this case:

  • A Control class is created for every use-case
  • A Boundary class is created for each association between an actor and a use-case.

During the design, these initial analysis classes are then refactored.

When using the ECB approach the generalization relationship between use-cases would be reproduced between the corresponding control classes. This avoids to loose the knowledge already identified in the analysis, and take advantage,in the design, of this special relationship instead of loosing time to rediscover it.

This is not UML, but the ECB approach was developed by the founding fathers of UML, so it’s worth to be aware of it.

Related