1 - e-Education Institute

advertisement
Review
Visual System Modeling
Tools
Todd Bacastow
Penn State University
Geospatial System Analysis & Design
1
Representing System Architecture
Logical View
Implementation View
Use Case View
Process View
Conceptual
Deployment View
Physical
2
Relationship Between Models and Diagrams
Use Case
Use Case
Diagrams
Sequence
Diagrams
Diagrams
Scenario
Scenario
Diagrams
Collaboration
Diagrams
Diagrams
Scenario
Scenario
Diagrams
Statechart
Diagrams
Diagrams
Use Case
Use Case
Diagrams
Use Case
Diagrams
Diagrams
State
State
Diagrams
Class
Diagrams
Diagrams
Models
State
State
Diagrams
Object
Diagrams
Diagrams
State
State
Diagrams
Component
Diagrams
Diagrams
Component
Component
Diagrams
Deployment
Diagrams
Activity
Diagrams
Diagrams
3
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.
4
Use Cases
Use case diagram
Use case list
Your System
Use Case
Use Case
Actor A
Actor A
Use Case
Use Case
Use Case
Actor B
Actor C
Use case disgrams
(UML)
Expended use case
Data
Interface
Application
5
Use Case Diagram
Use Case
Actor
Identify Movie
Customer
Open Account
Clerk
Return Movie
In-Store
Customer
Telephone
Customer
Review
Account Status
6
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
7
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.
8
UML Class Diagram
Customer
1
Rental Invoice
Rental Item
1..*
1
0..1
1
Checkout Screen
DVD Movie
VHS Movie
Video Game
9
UML Class Diagram
Multiplicity
Customer
Class
Simple
1
Aggregation
Rental Invoice
Abstract
Class
Rental Item
{abstract}
1..*
1
0..1
Composition
Simple
(Dependency)
Generalization
Association
Checkout Screen
DVD Movie
VHS Movie
Video Game
10
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.
11
Collaboration Diagrams
• Collaboration diagrams
describe interactions and links
• Focus on exchange of
messages between objects
• Appears during Analysis phase
• Enhanced during Design phase
12
Collaboration Diagram
:Rented Items
1: enter_customer()
3: enter_movies()
Object
5: add(customer, movies)
8: generateRentalTotal()
2: IsValidCust(CustId)
7: print invoice()
:Check-out
Manager
:Customer
:Clerk
4:GetMovieByBarcode()
:Inventory
Message
13
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
14
Sequence Diagram
:CheckoutMgr
:
Cust:Customer
:Inventory
:RentedItems
Employee
1: find customer()
3: enter movie()
2: search (string)
4: search (string)
Object
Activation
Message
5: rent (movie)
6: add(Cust, item)
Lifeline
7: printInvoice()
8: generateRentalTotal()
15
Component Diagram
Component
«library»
DB Server
Interface
(dbsvr.dll)
«library»
Application
Framework
(appfr.dll)
Interface
Dependency
«application»
Video
Workstation
(vstation.exe)
Note
Supplied by
Microsoft
16
Deployment Diagram
Node
Communication
:Store Server
Association
Phone Clerk Terminal
:Clerk Client
Check Out Terminal
:Clerk Client
Server
DB
«TCP/IP»
«TCP/IP»
Store
Server
App
17
Activity Diagram
Start State
Action State
Identify
Caller
Obtain Name
& Address
Current
Customer?
Decision
Open
Account?
[no]
[no]
[yes]
[yes]
End State
Create
Account
18
Swimlanes and Fork/Join Points
Customer
Identify
Movie
Manager
Walking Clerk
Fork Point
Place
Order
Place
Order
Pay
Collect
Money
Pickup
Movie
Deliver
Movie
Fill
Order
Join Point
19
State Diagram
Guard
Event
Transition
[more videos]
/get next video
customer appears
Validate
do/check
account
[account valid]
/get first video
Activity
State
[account not
valid]
Check-Out
Action
do/check-out
video
[no more videos]
Check-Out
Complete
20
UML Diagram Usage
Development
Phase
UML Diagrams
Analysis
Use Cases, Class Diagrams, Activity
Diagrams, Collaboration Diagrams,
Sequence Diagrams
Class Diagrams, Collaboration
Diagrams, Sequence Diagrams, State
Diagrams, Component Diagrams
Deployment Diagrams
Collaboration Diagrams, Sequence
Diagrams, Class Diagrams, State
Diagrams, Component Diagrams,
Deployment Diagrams
Package Diagrams, Deployment
Diagrams
Design
Development
Implementation
21
Download