Upload
miranda-bryant
View
216
Download
3
Embed Size (px)
Citation preview
Final Notes on the UML
CS 123/231
UML Diagramming Techniques
Class DiagramsUse Case DiagramsInteraction Diagrams
Sequence diagramsCollaboration diagrams
State DiagramsOthers (e.g., Activity Diagrams,
Packages)
Activity Diagram
Represents sequence of activitiesDepicts condition, iteration, and
parallel activitiesWhen to use:
Analyzing use casesAlternate way of describing a use caseDepicting use case sequences/workflow
Describing method behavior
Activity Diagram Notation
Oval - activityStart and end buttonsLinks between ovals to depict
sequenceDiamond – conditional branch and
mergeBar – fork and join (concurrent
activities)
About Activity Diagrams
Helps in understanding system behavior, but …
It does not provide an object-oriented perspective!
Suggestion: just use as a tool to clarify complex sequential/parallel relationships between behavioral components
CRC Cards
Not really part of the UMLBut helps in construction of Class
Diagrams and Interaction DiagramsCRC: Class-Responsibility-
CollaborationRole-playing:
Team members represent classesEach member/class holds an index card
CRC Cards, continued
Team goes through each use case and role-play object interaction
Responsibilities (which end up being methods) are noted on the index card
Use of an index card is deliberateResponsibilities ought to be evenly distributed
across the classes that interactOverloaded classes become immediately
apparent
CRC Cards and UML Diagrams
Role-playing activity for each use case maps directly to interaction diagram construction
Each card provide class details (methods) for the class diagram
Package Diagrams
Recall: Architectural DesignDivide a system into subsystemsDepicted using a block diagram
OO alternative: Package DiagramsPackage <-> Subsystem
Package: group of classesDependencies between packages
Package Diagram Notation
Folder: PackageDotted arrow between folders:
dependency linkTwo variations
Abbreviated: name in folderDetailed: name on folder tab, rectangles
representing classes in folder area
Using the UML
Use the UML as a communication tool across the different stages of software engineering
Primarily a design tool but helpful in analysis as well
Important to note what stage or perspective you are in
Perspectives
Conceptual (analysis)Focus on domain and requirementsUse case diagram, high-level class
diagram, maybe some activity diagramsSpecification (design)
Focus on solution/programming detailsImplementation
Focus on code
Phases in theRational Unified Process
InceptionFeasibility StudyAnalysis
ElaborationAnalysisDesign
ConstructionImplementation and Testing