Beruflich Dokumente
Kultur Dokumente
Language
Story:
What UML is for
Some of the main diagrams are and what you
use them for
An example
Diagrams
1 Class diagrams: Represents static
structure
2 Use case diagrams: Sequence of actions a
system performs to yield an observable result
to an actor
3 Sequence diagrams: Shows how groups of
objects interact in some behavior
4 State diagrams: Describes behavior of
system by describing states of an object
1 Class Diagrams
Better name: Static structure diagram
Doesnt describe individual objects: Only the
overall structure of the system
Different Levels of
Specifying Classes
Components of Class
Diagrams
Multiplicities
How many of
each?
Labels to
indicate how
reference is
viewed
Role and
Association
classes
Navigability and
Aggregations
Navigability
Who owns/contains/has who?
Arrows not strictly required
Composition:
closed diamond
Part can only
belong to whole
Qualifiers
Serves to describe an instance variable
that partitions the relationship.
Reserve book
Borrow book
Return book
Use Cases
Are actually defined as text, including
descriptions of all of the normal and
exception behavior expected
Do not reveal the structure of the system
Collectively define the boundaries of the
system to be implemented
Provide the basis for defining
development iterations
3 Sequence (Event)
Diagrams
Shows individual objects and how they
interact
Describes
Lifelines of objects
Who sends what messages when
Can also describe sending messages to self
("self-delegation")
Can describe guards, notes, etc.
Example Sequence
Diagram
State Diagrams
Describe all the possible states a
particular object can get into, and the
events that lead to those changes
Also called a "statechart"
Example: Student
Registration System
Not going to do all the diagrams
Not all types, not even all that completely
specify the system
1
1
enrollInClass:
gradeInCourse:
takenCourse:
*
Section
course
daysAndTime
roster
addStudent
removeStudent
1
1
Department
courses
requiredCourses
1..3
Registrar
courses
sections
Transcript
courseGrades
gradeForCourse:
takenCourse:
1
getSectionsFor:
enrollInSection:
dropFromSection:
*
1*
Course
1
*
name
number
0..3
department
creditHours
prereqs
prerequisites
CourseGrade
course
grade
termEnrolled
Enroll in
the University
Student
Enroll in
a Course
Withdraw
from a Course
Admissions
States of a Student
Apply [ Must be accepted first ]
Enrolled
Withdraw
Registered
AddCourse
Sequence Diagram:
Registering for Course
aStudent
theRegistrar
aSection
theTranscript
getSectionsFor:
return sections
enrollInSection:
takenCourse: prerequisite
takenCourse: prerequisite
state of prereq
have prereq
addStudent:
enrolled
enrolled
Process to Representations
OOA
CRC Cards (but theyre not officially UML)
Use Cases
OOD
Just about all of the rest
But variationssome detail is later
OOP
Can actually go UML->code with some tools!
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1997,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1998,
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999
1999