In UML class diagrams, I am told we should not have any standalone classes but that they should all be connected in some way. In theory that makes sense and with simple classes, sure.. take the following for example:
So, a Person
can have 0 or more of Car
... Fair enough.. but now take the following example:
The Person
and PersonRepository
are not really connected in the sense that a Person
can belong to a PersonRepository
or that a PersonRepository
has a Person
. They are associated in that the PersonRepository
will return a Person
for the given ID
however. So, is it correct to add an association line between them and if so, which way should it point? I am getting conflicting info about this situation. I'd appreciate any clarification given on this.