Introduction To UML: Lawrence Chung CS6358.OT1: Module 2 1
Introduction To UML: Lawrence Chung CS6358.OT1: Module 2 1
Introduction to UML
Background
What is UML for?
Building blocks of UML
Process for Using UML
Fulfill Order
Item
via
Ships the Item
Business Process
Constructing
Models are related to OO programming languages.
Round-trip engineering requires tool and human intervention to avoid information loss
Forward engineering — direct mapping of a UML model into code.
Reverse engineering — reconstruction of a UML model from an implementation.
Documenting
Architecture, Requirements, Tests, Activities (Project planning, Release management)
behavior
Use Case View
system topology
performance distribution
scalability Process View Deployment View delivery
throughput installation
Design View
Encompasses classes, interfaces, and collaborations that define the vocabulary of a
system.
Supports functional requirements of the system.
Static aspects captured in class diagrams and object diagrams.
Dynamic aspects captured in interaction, statechart, and activity diagrams.
Implementation View
Encompasses components and files used to assemble and release a physical system.
Addresses configuration management.
Static aspects captured in component diagrams.
Dynamic aspects captured in interaction, statechart, & activity diagrams.
Deployment View
Encompasses the nodes that form the system hardware topology.
Addresses distribution, delivery, and installation.
Static aspects captured in deployment diagrams.
Dynamic aspects captured in interaction, statechart, & activity diagrams.
Things
important modeling concepts (individual ones as the primitive
kinds)
Relationships
tying individual things (i.e., their concepts)
Diagrams
grouping interrelated collections of things and relationships
Active Class
2. Interface
A collection of operations that specify a service (for a
resource or an action) of a class or component. It describes
the externally visible behavior of that element.
<<interface>>
IWindow name IWindow
operations open()
close()
3. Collaboration
Define an interaction among a web of objects. Chain of
Define a society of roles and other elements. Responsibility
Provide cooperative behavior.
Capture structural and behavioral dimensions.
4. Use Case
A sequence of actions that produce an observable
result for a specific actor. Place Order
Provides a structure for behavioral things.
Realized through a collaboration (usually realized by
a set of actors and the system to be built).
7. Node
Element that exists at run time.
Represents a computational resource. WebServer
Generally has memory and processing power.
Variations on Structural Things: Actors, Signals, Utilities, Processes & Threads, Applications, Documents, etc.
Idle Waiting
Meeting Scheduler
flexible
drop-out dates
4 Kinds
Dependency
Association
Generalization
Realization
2. Associations
a structural relationship that describes a set of links, a link being a connection between
objects.
employer employee
0..1
*
Can be directed labels Can have multiplicity & role names
Aggregation
a special kind of association. It represents a
structural
relationship between the wholeRepresented
and its parts.by a black diamond.
3. Generalization
a specialization/generalization relationship in which objects of the specialized element
(the child) are more specific than the objects of the generalized element.
4. Realization
a semantic relationship between two elements, wherein one element guarantees to carry
out what is expected by the other element.
Where?
Between interfaces and classes that realize them…
Between use cases and the collaborations that realize them...
Statechart Diagram
Activity Diagram
Component Diagram
Deployment Diagram
Professor
Registrar
Student
Billing System
The system prompts the professor to select the desired activity: ADD, DELETE,
REVIEW, or QUIT.
If the activity selected is ADD: Add a Course subflow is performed.
If the activity selected is DELETE: Delete a Course subflow is performed.
If the activity selected is REVIEW: Review Curriculum subflow is performed.
If the activity selected is QUIT, the use case ends.
Professor
Student
Set Course Offerings
Maintain Schedule
Registrar
<<uses>>
<<extends>>
Register for courses
<<uses>>
Register for Logon validation
Distance Learning courses
Maintain curriculum
1: fill in info
2: submit
course form :
1: set course info CourseForm
2: process
theManager :
aCourse :
CurriculumManager
Course
4: new course
ScheduleAlgorithm
RegistrationForm
RegistrationManager
Course
Student
Professor
CourseOffering
Attributes
• The structure of a class is represented by its attributes
• Attributes may be found by examining class definitions, the problem
requirements, and by applying domain knowledge
CourseOffering
Each course offering number
has a number, location and time location
time
ScheduleAlgorithm
RegistrationForm
RegistrationManager
addStudent(Course, StudentInfo)
Course
name
numberCredits
Student open()
name addStudent(StudentInfo)
major
Professor
name CourseOffering
tenureStatus location
open()
addStudent(StudentInfo)
Harry
(Student)
Name: “Harry Mat”
Major: CS
Sue
(Professor)
Name: “Sue Becker”
tenureStatus: true
RegistrationManager
Registration Math 101:
Manager Course
3: add student(Sue)
Course
ScheduleAlgorithm
RegistrationForm
0..*
1 RegistrationManager
addStudent(Course, StudentInfo)
1 Course
name
0..* numberCredits
Student open()
addStudent(StudentInfo)
major
1
3..10
Professor 1..*
4 CourseOffering
tenureStatus location
1
0..4 open()
addStudent(StudentInfo)
ScheduleAlgorithm
RegistrationForm
RegistrationManager
addStudent(Course, StudentInfo)
Course
name
RegistrationUser numberCredits
name
Student open()
addStudent(StudentInfo)
major
Professor
CourseOffering
tenureStatus location
open()
addStudent(StudentInfo)
Cancel
Cancel [ count = 10 ]
Canceled
do: Notify registered students
Closed
Cancel do: Finalize course
[ Count = 10 ] ^Course
Report.Create report
Cancel course
Cancelled Closed
Cancel course
Swimlanes
a mechanism to group and
organize activity states Decompress
Cleanup
Decompress
Sync 1
Decompress
Gesture
Sync 2
Synchronization
Synch Mouth Stream Audio
sync3
Sync 4
Cleanup
Cleanup
Billing.exe Register.exe
Billing
System Registrar.exe
People.dll
User
Course.dll
Course
Courses.dll
People.dll
Student Professor
Course Course
Offering
Registration Database
Main
Library Building
Dorm
Display the boundary of a system & its major functions using use
cases and actors
Illustrate use case realizations with interaction diagrams
Represent a static structure of a system using class diagrams
Model the behavior of objects with state transition diagrams
Reveal the physical implementation architecture with component &
deployment diagrams
Extend your functionality with stereotypes
Use case driven — use cases are primary artifact for defining behavior
of the system.
Architecture-centric — the system’s architecture is primary artifact for
conceptualizing, constructing, managing, and evolving the system.
Iterative and incremental — managing streams of executable
releases with increasing parts of the architecture included.
Primary phases
Inception — seed idea is brought up to point of being a viable project.
Elaboration — product vision and architecture are defined.
(http://www.utdallas.edu/~chung/OOAD_SUMMER04/HACS_vision_12.doc)
Construction — brought from architectural baseline to point of deployment into
user community.
Transition — turned over to the user community.
Resulting Benefits
• Releases are a forcing function that drives the development team to closure
at regular intervals - Cannot have the “90% done with 90% remaining” phenomenon
• Can incorporate problems/issues/changes into future iterations rather than
disrupting ongoing production
• The project’s supporting elements (testers, writers, toolsmiths, QA, etc.) can
better schedule their work
Develop Iteration N
• Collect cost and
Assess Iteration N
Revise Overall
Project Plan
• Cost
• Schedule
• Scope/Content Risks Eliminated
Revise Project Risks
• Reprioritize
Iteration Planning
Reqs Capture
Analysis & Design
Implementation
Test
Release description
Prepare Release
Updated risk assessment
Controlled libraries
• expect
– To face some persistent, recurring risks
– To discover new risks along the way
– To do some rework; to throw away some lines of code
– To change requirements along the way
Background
1: add a course
2: display : Professor course form
course
6: add professor (professor) 6: add professor (professor)
course offering