What is the purpose of the UML classifier?

I cannot understand what a qualifier is in UML. For example, on the scanned page there is a qualifier named "SharedRegister", which has "state" and "plateNumber".

Why not just use a class called SharerRegister and put "state" and "plateNumber" in it? What does he offer over the class exactly?

Schaum UML - pg 108

(Image from Schaum's templates, UML 2nd edition. Simon Benett. Pg 108)

+4
source share
1 answer

state and PlateNumber act as the key with which you can access the corresponding class. If you did not use the classifier, you would have a correlation between classes with a plurality *, but you would not know exactly how they are related. Here you know that the ShareRegister class, knowing the specific value for state and PlateNumber , can access 0 or 1 CarSharer instances.

+5
source

Source: https://habr.com/ru/post/1411346/


All Articles