classoopumlassociationsooad

UML class diagram about relationship types in project management


I'm trying to draw an class diagram for my project management software describing the following. It contains the following classes:

and the following relationships/associations:

  1. a project manager may have to manage more than one project, while a project can only be managed by one project manager

  2. a project manager can assign an employee to a project that he/she manages

For the above associations I created this class diagram:

enter image description here


Solution

  • You just add an operation to Project called assignEmployee which will add the employee to its list of assigned employees:

    enter image description here

    It's unclear how an employee can be assigned, whether to just one or multiple projects. Also you will likely need a de-assign operation.

    Of course you can also use an association class like suggested by @WolfgangFahl.