Class diagram issue

I want to ask, in general, should we include “anonymous user” as a class in class diagram?

thanks

Software modelling cannot be generalised because you model specifically for your system. No one can say that it would generally make sense to have a so-and-so class in your class diagram – it all depends on your domain.

An “anonymous user” sounds like an instance of a user class. If that’s the case, you would have a user class and if you really need to constrain your model to have exactly one anonymous user, you can specify that using something like OCL.