Deel 8 UML Fragment C
Deel 8 UML Fragment C
Company Person
employs
0..* 0..*
EmploymentContract
Association class
annualSalary : Money
dateOfRecruitment : Date Association attributes
69
Additional language concepts:
Association classes (2/2)
EmploymentContract
Company Person
issues annualSalary : Money has
1..1 0..* dateOfRecruitment : Date 0..* 1..1
70
Additional conventions for this lecture
71
Additional conventions for this lecture
Vehicle
name : String
weight : Decimal Vehicle
initialRegistration: Date
name : String
setName()(name: String) weight : Decimal
setWeight()(weight: Decimal) initialRegistration : Date
getName() : String calculateAge(): Integer
getWeight() : Decimal
calculateAge(): Integer
72
Additional conventions for this lecture
73
Additional language concepts:
Generalisation/specialisation—multiple
inheritance
Employee
firstName : String
lastName : String
dateOfBirth : Date
StudentAssistant ResearchAssociate
staffID : String staffID : Integer
matriculationNumber : Integer dateOfRecruitment : Date
dateOfMatriculation : Date maritalStatus : Char
getSemester() : Integer
DoctoralStudent
desiredDegree : Doctorate
qualifyingDegree : StudyProgramme
74
Additional conventions for this lecture
75
Additional language concepts:
Abstract class
<<abstract>>
Class Class
76
Additional language concepts: Visibility
(1/3)
Source: www.ibm.com/developerWorks
77
Additional language concepts: Visibility
(2/3)
UML class diagrams offer various additional language
concepts for defining implementation-level aspects to
support the software design/implementation phase
78
Additional language concepts: Visibility
(3/3)
Customer
+name : String
-address : String
#dateOfBirth : Date
+getName() : String
+setName (name: String)
+getAddress () : String
+setAddress (address: String)
Visibility +getDateOfBirth () : Date
+setDateOfBirth(dob: Date)
79
Additional language concepts:
Navigation (bidirectional vs. unidirectional
association)
Navigation: Specifies where (i.e., in objects of which
classes) references to objects of associated classes should
be stored
Employee
Company
employs name : String
name : String
annualSalary : Money
legalForm : String
1..1 0..* dateOfRecruitment : Date
numberOfEmployees() : Integer
Direction of navigation
Employee Employee
Company Company
name : String employs name : String
name : String employs name : String
annualSalary : Money annualSalary : Money
legalForm : String legalForm : String
1..1 0..* dateOfRecruitment : Date 1..1 0..* dateOfRecruitment : Date
numberOfEmployees() : Integer numberOfEmployees() : Integer
81
Core concepts of object-orientation:
Consideration in the UML Class Diagram
modelling language (1/4)
Student
matriculationNumber : Integer
dateOfMatriculation : Date
getSemester( date : Date ) : Integer
82
Core concepts of object-orientation:
Consideration in the UML Class Diagram
modelling language (2/4)
Customer
+name : String
-address : String
#dateOfBirth : Date
+getName() : String
+setName(name:String)
+getAddress() : String
+setAddress(address:String)
Visibility +getDateOfBirth() : Date
+setDateOfBirth(dob:Date)
83
Core concepts of object-orientation:
Consideration in the UML Class Diagram
modelling language (2/4)
Student Professor
matriculationNumber : Integer staffID : Integer
dateOfMatriculation : Date dateOfRecruitment : Date
getSemester() : Integer
StudentAssistant ResearchAssociate
matriculationNumber : Integer staffID : Integer
dateOfMatriculation : Date dateOfRecruitment : Date
getSemester() : Integer calculateChristmasBonus() : Decimal
calculateChristmasBonus() : Decimal
86
Assessment
Assessment: UML
88
Exam preparation questions (1/2)
89
Exam preparation questions (2/2)
90
Literature
91