Search code examples
umlclass-designsoftware-designclass-diagramclass-relationship

UML Class relationships with respect to current moment or system lifetime


I've a question regarding the following diagram

enter image description here

My Qustion is in the relation between driver - Car and Passenger and Cars.

1- The * at driver end means that a car can be driven by many drivers, which is a relationship between the both classes at the lifetime of the system.

2- In the other case the relation ship between car and passengers are realtime relation ship, that at maximum only 0-7 passengers can be on the same car.

Did i get something wrong? How should i think about the relationships, is it realtime relationship between objects or relationship on the lifetime of the car


Solution

  • That actually looks like nonsense :-)

    It means that a Driver operates 1 or more Cars. Multi-tasking might be some new capability of human beings (I doubt that). So driving two cars the same time will be tough, but then * cars?

    The drawback with such class diagrams is that you can not see what kind of relation is meant. I assumed operates but it may well mean owns. A role name would clarify this ambiguity.