8.9 Association Classes

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

UNIFIED MODELING LANGUAGE (UML)

Class and Objects Diagrams

Dr.Yi Mon Thet


Faculty of Information Science
University of Computer Studies (UCSY)
Outlines
 Data Types  Aggregation
 Classes  Composition
 Describing Objects With Classes  Association Classes
 Associations  N-ary Associations
 Generalization And Specialization  Qualified Associations
 Inheritance Of Attributes And  Interfaces
Operations  Templates
Attributes
 Attributes describes the properties of the instances of a class
 Eg I - Student Class
SId

S1 S2 S3
Student

SId
Attributes Mg Mg Hla Hla Kyaw Kyaw
SName

SNames
Association
 E.g-1I To record student marks in Student Marks Record System

Takes
Student * * Module

Figure 8.40 A simple model for recording exam results


Problems of recording student marks
Problems about which mark was gained for which module Consistency Problem

Student
Student Module
SId
SId MId
SName
SName Marks
MId
Marks
Mg Mg,30 Marks
401=30 401 Hla Hla,70
Mg Mg 402=60 401=30
403=50 Mg Mg,60
402 402=60
Hla Hla,80
401=70 Mg Mg 403=50
Mg Mg,50
Hla Hla 402=80 403 401=50
Hla Hla,78
403=78
S1 Mg Mg 401 30
S1 S2 401 402 403 S1 Mg Mg 401 50
Mg Mg Hla Hla 30 70 60 80 50 78 S2 Mg Mg 402 60
30 60 50 70 80 78 S3 Mg Mg 403 50
Association Classes
 Association classes provide a means of associating data values with links
 In particular, an association class can, like an association, connect two
classes and yet at the same time have attributes, like a class, to store data
belonging specifically to the link.

Figure 8.41 Using an association class to store marks


Association Classes (Cont’d)
 Reification

Figure 8.42 Using reification to store marks


Association Classes (Cont’d)
 Association classes have all the properties of ordinary associations
 They also share all the properties of classes,
 the ability to participate in further associations

Figure 8.43 An association class participating in an


association
Click icon to add picture

Next Lecture
Thank You.

N-ary Association

Course Introduction

You might also like