1
ReviewVisual System Modeling
Tools
Todd BacastowPenn State University
Geospatial System Analysis & Design
2
Representing System Architecture
Conceptual Physical
Logical View Implementation View
Process View Deployment View
Use Case View
3
Relationship Between Models and Diagrams
Use CaseDiagramsUse Case
DiagramsUse CaseDiagrams
ScenarioDiagramsScenario
DiagramsCollaborationDiagrams
StateDiagramsState
DiagramsComponentDiagrams
ComponentDiagramsComponent
DiagramsDeploymentDiagrams
StateDiagramsState
DiagramsObjectDiagrams
ScenarioDiagramsScenario
DiagramsStatechartDiagrams
Use CaseDiagramsUse Case
DiagramsSequenceDiagrams
StateDiagramsState
DiagramsClassDiagrams
ActivityDiagrams
Models
4
Use Cases
• Describe interactions between users and computer systems (both called actors) .
• Capture user-visible functions. • Achieve discrete measurable
goals.• Are typically used during
Analysis and Design.
5
Use Cases
Actor A
Your SystemUse Case
Actor B
Actor A
Use case disgrams(UML)
Use Case
Use Case
Use Case
Use Case
Actor C
Data
Interface
Application
Use case diagramUse case list
Expended use case
6
Use Case Diagram
Telephone Customer
In-StoreCustomer
Clerk
Identify Movie
Open Account
Return Movie
Customer
ReviewAccount Status
Actor
Use Case
7
Use Case Report
• The Use Case Report provides documentation for the Use Case.
• A Use Case is not complete without the report.
• The elements of the Use Case Report are shown on the right.
• Brief description• Precondition• Flow of events
– Main flow– Subflows– Alternate flows
• Postcondition• Special Requirements• Enclosures
– Diagrams– Pictures of the UI
• Brief description• Precondition• Flow of events
– Main flow– Subflows– Alternate flows
• Postcondition• Special Requirements• Enclosures
– Diagrams– Pictures of the UI
8
Class Diagrams
• Are the most fundamental UML Diagram.
• Describe the classes in the system, and the static relationships between classes.
• Class diagrams are used during Analysis, Design and Development.
9
UML Class Diagram
DVD Movie VHS Movie Video Game
Rental Item
Rental Invoice
1..*1
Customer
Checkout Screen
1
0..1
1
10
UML Class Diagram
DVD Movie VHS Movie Video Game
Rental Item{abstract}
Rental Invoice
1..*1
Customer
Checkout Screen
0..1
1
Simple
Association
Class
Abstract
Class
Simple
Aggregation
Generalization
Composition
(Dependency)
Multiplicity
11
Parts of a Class
• Classes can have four parts– Name– Attributes– Operations– Responsibilities
• Classes can show visibility and types.
• All parts but the Name are optional.
MyClassName
+SomePublicAttribute : SomeType
-SomePrivateAttribute : SomeType
#SomeProtectedAttribute : SomeType
+ClassMethodOne()
+ClassMethodTwo()
Responsibilities
-- can optionally be described here.
12
Collaboration Diagrams
• Collaboration diagrams describe interactions and links
• Focus on exchange of messages between objects
• Appears during Analysis phase• Enhanced during Design phase
13
:Check-out Manager
:Customer
:Inventory
1: enter_customer()
3: enter_movies()
5: add(customer, movies)
7: print invoice() 2: IsValidCust(CustId)
4:GetMovieByBarcode()
Collaboration Diagram
:Clerk
Object
Message
:Rented Items
8: generateRentalTotal()
14
Sequence Diagrams
• Can be “morphed” from Collaboration Diagrams.
• Describe interactions between objects arranged in time sequence
• Focus on objects and classes involved in the scenario and the sequence of messages exchanged
• Associated with use cases• Used heavily during Analysis phase
and are enhanced and refined during Design phase
15
Sequence Diagram
1: find customer()2: search (string)
4: search (string)
6: add(Cust, item)
3: enter movie()
5: rent (movie)
7: printInvoice() 8: generateRentalTotal()
Object
Lifeline
ActivationMessage
:CheckoutMgr :InventoryCust:Customer :RentedItems:Employee
16
Component Diagram
«applica tion»V ideo
W orksta tion(vsta tion .exe)
« lib rary»D B S erverIn terface
(dbsvr.d ll)
Supplied byM icrosoft
«lib rary»A pplica tionFram ework(appfr.d ll)
Component
Interface
Dependency
Note
17
C heck O ut Term ina l:C lerk C lien t
P hone C lerk Term ina l:C lerk C lien t
:S tore S erver
S erverD B
S toreS erver
A pp«TC P /IP »
«TC P /IP »
Node
Communication
Association
Deployment Diagram
18
Identify Caller
Create Account
Obtain Name& Address
Open Account?Current
Customer? [no] [no]
[yes][yes]
Action State
Start State
Decision
End State
Activity Diagram
19
Identify Movie
PlaceOrder
Place Order
FillOrder
Pay
DeliverMovie
PickupMovie
Customer Manager Walking Clerk
Fork Point
Join Point
CollectMoney
Swimlanes and Fork/Join Points
20
State Diagram
Validate
do/checkaccount
custom er appears
Check-Out
do/check-outvideo
[account valid ]/get first video
[m ore videos]/get next video
Check-OutComplete
[no m ore videos]
[account notvalid]State
Transition
Activity
Guard
Action
Event
21
UML Diagram Usage
Development Phase
UML Diagrams
Analysis Use Cases, Class Diagrams, Activity Diagrams, Collaboration Diagrams, Sequence Diagrams
Design Class Diagrams, Collaboration Diagrams, Sequence Diagrams, State Diagrams, Component Diagrams Deployment Diagrams
Development Collaboration Diagrams, Sequence Diagrams, Class Diagrams, State Diagrams, Component Diagrams, Deployment Diagrams
Implementation Package Diagrams, Deployment Diagrams