Group Members RUKHSAR AHMED 15081598-019 AHSAN KHALID 15081598-002 NOMAN KHALID 15081598-005
Group Members RUKHSAR AHMED 15081598-019 AHSAN KHALID 15081598-002 NOMAN KHALID 15081598-005
Group Members RUKHSAR AHMED 15081598-019 AHSAN KHALID 15081598-002 NOMAN KHALID 15081598-005
name : String
address : Address
birthdate : Date
ssn : Id
eat Operations describe the class behavior
sleep and appear in the third compartment.
work
play
Depicting Classes
When drawing a class, you needn’t show attributes and operation
in every diagram.
Calculator
+power(num: integer):integer
Relationships
• dependencies
• generalizations
• associations
Dependency Relationships
A dependency indicates a semantic relationship between two or
more elements. The dependency from CourseSchedule to
Course exists because Course is used in both the add and
remove operations of CourseSchedule.
CourseSchedule
Course
add(c : Course)
remove(c : Course)
Generalization Relationships
Person
A generalization connects a subclass
to its superclass. It denotes an
inheritance of attributes and behavior
from the superclass to the subclass and
indicates a specialization in the subclass
of the more general superclass.
Student
Generalization Relationships
(Cont’d)
UML permits a class to inherit from multiple super classes,
although some programming languages (e.g., Java) do not permit
multiple inheritance.
Student Employee
TeachingAssistant
Association Relationships
Student Instructor
Association Relationships
(Cont’d)
We can indicate the multiplicity of an association by adding
multiplicity adornments to the line denoting the association.
membership
Student 1..* 1..* Team
Association Relationships
(Cont’d)
We can specify dual associations.
member of
1..* 1..*
Student Team
1 president of 1..*
Association Relationships
(Cont’d)
Associations can also be objects themselves, called link classes
or an association classes.
Registration
modelNumber
serialNumber
warrentyCode
Product Warranty
Exampl
e