UML Tutorial 1
UML Tutorial 1
1
Modeling
3
Recent History: 1990’s
• Why?
– Natural evolution towards each other
– Effort to set an industry standard
4
UML
• Design by committee
– Many interest groups participating
– Everyone wants their favorite approach to be “in”
5
UML
• Design by committee
– Many interest groups participating
– Everyone wants their favorite approach to be “in”
6
UML (Cont.)
7
Objectives of UML
8
This and Next Lectures
• We discuss
– Use Case Diagrams for functional models
– Class Diagrams for structural models
– Object Diagrams
– Sequence Diagrams
– Activity Diagrams for dynamic models
– State Diagrams
10
Behavioral Diagram
11
Use Case Diagram
• Elements
– Actors
Use
– Use cases
case
– Relations
actor
• Use case diagram
shows relationship Use
case
between actors and
use cases
actor
12
Use Case Diagram Example
<<extends>>
Ride Business
Class Ride
passenger
Diagnose <<extends>>
<<uses>>
Economy
Class Ride
Repair
technician
13
Example:
Project and Resource Management System
14
15
Do these Use Cases Pass the Tests?
• Boss test?
• EBP test?
• Size test?
16
Manage Project Use Case
Train
• Describe classes
lastStop
– In the OO sense
nextStop
• Class diagrams are
static -- they display velocity
20
Relationships in UML
21
Association
23
Examples of Association
24
Link Attributes
25
Association
26
Types of Association
Aggregation Composition
27
Aggregation Composition
4 1..*
Wheels Consultant
29
Composition Aggregation
Car Project
1 1
4 1..*
Wheels Consultant
30
CS435 McGlothlin
1 1
* 1..*
Student classroom
31
Aggregation Composition
CS435 Millington
1 1
* 1..*
Student Classroom
32
Generalization
• Inheritance between
classes Button
• Denoted by open
triangle
RequestButton EmergencyButton
33
Generalization
34
Generalization
35
Generalization
• (Think subclassing)
Doctor
Cardiologist
36
Generalization
37
Generalization
38
Realization
39
Dependency
40
41
42
Example class diagram?
43
Which Relation is Right?
44
Relationships in UML
45
46
47
48
Object Diagram
49
50
Sequence Diagrams
• Sequence diagrams
– Refine use cases
– Gives view of dynamic behavior of classes
• Class diagrams give the static class structure
52
Development Process
54
UML Driven
Process Model
55
Work Products
56
Acknowledgements
57