How to work with Association classes in UML - Part1?

Class Association is not always very simple sometimes association has operations and attributes to show such association and to define the features of an association we use association classes.

For example, if I say draw a class diagram for a student taking courses then class diagram would include only two classes "Students" and "Courses" and there will be a simple association between them with many to many multiplicity, means students can take zero or more courses and on other hand courses can have zero or many students. See diagram below:

UML association classes example 1

Now, if I change the system requirements a little and tell you that now the system records assessment of each course the student takes and sends the assessment report to students later on. In this case our association has operation that is to send assessment report and some attributes, lets say grade obtained and total marks. Now we are required to use an association class to show the features of the association we have between students and courses and our class diagram would look something like this:

UML association classes example 1

In the next part i will further explain the concept using a different scenario to strengthen the understanding of this concept so STAY TUNED!

Did this tutorial help a little? How about buy me a cup of coffee?

Buy me a coffee at ko-fi.com

Please feel free to use the comments form below if you have any questions or need more explanation on anything. I do not guarantee a response.

IMPORTANT: You must thoroughy test any instructions on a production-like test environment first before trying anything on production systems. And, make sure it is tested for security, privacy, and safety. See our terms here.

Comments (write a comment):

if the association class has no other attribute than the composite keys what do I have to put in the attribute box? can I leave it blank? Posted by: Hestya P on Aug 05, 2011

Yes you can leave it blank Posted by: Shahbaz on Aug 07, 2011

leave a comment on tutorial leave a comment