UML Books
- Sam's teach yourself UML in 24 Hours
by Joseph Schmuller - UML Bible
by Tom Pender - The Elements of UML Style
by Scott W. Ambler
UML Diagrams
- Use Case Model - captures user's perspective
- Use case diagrams
- Logical Model
- Structure of the system
- Class diagrams, package diagrams
- Behaviour of the system
- Sequence diagrams, communication diagrams, state transition diagrams, activity diagrams
- Physical Model
- Component diagram (software)
- Deployment diagram (hardware)
Use Case Diagrams
Identifies who interacts with the system - actors
Identifies major parts of system's functionality - use cases
Logical Model
(Structure of the System)
Describes the static strucure of the system
- Classes
- Attributes
- Operations
- Relationships
- Class diagrams
- Packages
- Package diagrams
Use Case Analysis
Use cases are top-level items of system's functionality from the user's point of view
Two comnponents of documenting use cases:
- Written use case descriptions
- Use case diagram
Shows interaction between users and the system in very general terms
- No detailed steps
- No timing condideration
No standard format
Typical elements:
- Use case name (verb-noun phrase)
- Who interacts with it (actors)
- What triggers it
- Normal flow of events
- Subflows (break it down to simplify description)
- Exceptional flows
Use Case Diagrams
Use cases - major pieces of system's functionality, as observed by the users
- Within the system's boundaries
- Labeled with ver-noun phrase
Actors - people (roles) or other systems that interact with our system
- Derives benefit from the system
- Is external to the system
Relationships
Association
- Links an actor to the use case(s) with which it interacts
Relationships between two use cases
- Include
- Extend
- Generalization
Relationships between two actors do not exist (irrelevant outside of the system)
Relationships between two use cases cannot be an association
Classes
Finding and documenting classes
- Informal description
- Identify nouns (objects) and verbs (operations) in written problem description
- CRC cards
- Structured analysis
- Model the problem - dataflow diagrams, etc
- Analyze data elements for potential objects
Class Diagrams
Symbols
- Class
- Association
- Cardinality
- Association classes
- Aggregation
- Generalization
+ PublicProperty1
+ PublicProperty2
+ PublicProperty3
+ PublicProperty : int
# ProtectedProperty : string
- privateProperty : float = defaultValue