Professional Documents
Culture Documents
UML diagrams are not only made for developers but also for
business users, common people, and anybody interested to
understand the system.
Why we use UML?
Use graphical notation: more clearly than natural language
(imprecise) and code (too detailed).
Simplifies the complex process of software design
Help acquire an overall view of a system.
UML is not dependent on any one language or technology.
UML moves us from fragmentation to standardization.
02/09/2021 O-O Software Engineering 7
Context Models
• Context models show the relationships of the system to other systems,
and are used to establish the system boundaries.
• Done at an early stage in the specification of a system
• The advantage of relying on other systems that you avoid duplicating
data.
• The major disadvantage, however, is that using other systems may make
it slower to access information.
• For example, say you are developing the specification for the patient
information system for mental healthcare(MHC-PMS); the system may
retrieve Patient Record and previous Prescription from other system
Borrow
Employee
Client
Order Title
Fine Remittance
Supervisor
Name
Account_Name
- Customer_ Name
Attributes
- Balance
+addFunds( ) Operations
+withDraw( )
+transfer( )
Regular Loyalty
Customer Customer
Subtype1 Subtype2
or: Customer
- Generalization expresses a
parent/child relationship among related
classes.
- Used for abstracting details in several Regular Loyalty
layers Customer Customer
02/09/2021 O-O Software Engineering 23
OO Relationships: Association
• Represent relationship between instances of classes
• Student enrolls in a course
• Courses have students
• Courses have exams
• Association has two ends
• Role names (e.g. enrolls)
• Multiplicity (e.g. One course can have many students)
• Navigability (unidirectional, bidirectional)
0..1 *
employer teacher
Multiplicity Role
Symbol Meaning
1 One and only one Role
0..1 Zero or one
“A given university groups many people;
M..N From M to N (natural language)
* From zero to any positive integer
some act as students, others as teachers.
0..* From zero to any positive integer
A given student belongs to a single
1..* From one to any positive integer
university; a given teacher may or may not
be working for the university at a particular
time.”
02/09/2021 O-O Software Engineering 25
Class diagram
Class Student {
Course enrolls[4];
}
Class Course {
Student have[];
}
02/09/2021 O-O Software Engineering 27
OO Relationships: Composition
Composition: expresses a relationship among instances
Whole Class of related classes. It is a specific kind of Whole-Part
Class W relationship.
• The diagram shown below shows that a deployment diagram for a home computer
system. Computer consists of these hardware elements: CPU, monitor, printer, mouse,
keyboard. And installed software components: Windows98, Office98,
InternetExplorer4, FrontPage, DOS, NortonCommander, TurboPascal.
• In most cases the deployment diagram is used in conjunction with component diagram.
•.