Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generalization, include or extend

In my book OCUP 2 Certification Guide, there is this following example about a use case generalization relationship:
enter image description here

Am I wrong that I do not see this as a generalization-relationship? A pay by cash does not feel like a "kind-of" pay overdue fine, but more like an extend or include? Would you see any objective arguments that would support the choice of the generalisation?

like image 404
Sabine Meijran Avatar asked Sep 02 '25 04:09

Sabine Meijran


1 Answers

The problem in the diagram is that its author made some graphical shortcuts: Pay overdue fine by cash would be an excellent specialization of Pay overdue fine, considering it's a kind of fine payment, with some more specific behaviors related to the payment mode.

The diagram is not wrong but ambiguous. Seeing the generalisation and the wording, I immediately read it with the specialisation in mind, i.e. that the payment is implicitly a fine payment. But this is my own interpretation, and you are also right if you see it as an extension (e,g. some additional behavior that is inserted at specific extension points).

I'd advise anybody to avoid this kind of ambiguity or better, keep the additional details for the narrative, to keep some place for elements that are more important.

like image 175
Christophe Avatar answered Sep 05 '25 00:09

Christophe