Can I include a standalone class in class diagram?

Viewed 100

I have a class diagram of my system that I made, the problem is I have a class that doesn't have any relation to another class inside the ecosystem. The full diagram that I've already made is like this:

enter image description here

Is it possible to have this kind of class diagram, where there is one standalone class there, and also two classes (ProgoProject-ProgoDocument) with relation but no relation to other?

1 Answers

Yes, you can have disconnected classes in a class diagram:

  • Classes are not obliged to be associated with other classes. Standalone classes, or islands of classes without associations to other islands are very common.
  • Objects of one class can interact with other objects, including of other classes, even without being associated. This is possible via multiple ways, for example when the operation of one object is called with an other object as argument; or if some global objects (or transient local objects within an operation) are known to others.

By the way: some people analyse some more metrics in UML models for assessing complexity of a design and risks (e.g. this article)

Related