Upload
aubrie-flynn
View
222
Download
0
Tags:
Embed Size (px)
Citation preview
S
Chapter 5 System Modeling
1
Context Model
Shows context (environment) of proposed system Other software People
Roadmap of major areas to consider
Other software systems Supplying data Using Data Sharing data Offering services User interface
2
Context
3
Process UML Activity Diagram
Show activities of a system
Symbology Filled circle – start of a process Rounded boxes – activities Arrows - flow Bars –
Full completion of predecessors needed successors occur in parallel
4
Process – UML Activity Diag.
5
Use Case Modeling
Each use case is a discrete task
Actors (stick figures) People Programs
Activity
Tabular description
6
Use Case
7
Use Case - textual
8
MHC-PMS: Transfer data
Actors Medical receptionist, patient records system (PRS)
Description A receptionist may transfer data from the MHC-PMS to a general patient record database that is maintained by a health authority. The information transferred may either be updated personal information (address, phone number, etc.) or a summary of the patient’s diagnosis and treatment.
Data Patient’s personal information, treatment summary
Stimulus User command issued by medical receptionist
Response Confirmation that PRS has been updated
Comments The receptionist must have appropriate security permissions to access the patient information and the PRS.
Use - Case
Chapter 4 Requirements engineering9
Sequence Diagrams
Actors, objects in boxes at top
Dotted line denotes their timeline
Solid box denotes their activity
Arrows show interaction between activities
Time flow is top to bottom
10
Sequence Diagam
Chapter 4 Requirements engineering11
12
Sequence Diagram
Sequence Diagrams
Web server access
Three tier model
FTP protocol
DHCP - Broadcast, Offer, Request, Acceptance
Web access/DNS
Chapter 4 Requirements engineering13
Activity
Home security system Window, door sensors Central security system Phone confirmation Dispatch Security officer
Chapter 4 Requirements engineering14
Class Diagrams
Define objects and object relationships
Box refers to a class
Line designates a relationship
Numbers identify quantity 1 – single * many
15
Class Diagrams
Chapter 4 Requirements engineering16
Class Detail
Name at top
Attributes next
Methods at bottom
17
Class Detail
Chapter 4 Requirements engineering18
Generalization hierarchy
Class hierarchy
Root represents base class, most common definition
Branches add attributes, operations
19
Class Hierarchy
20
Class Hierarchy - detailed
21
Example
Real Estate Property Residential Commercial Land
Chapter 4 Requirements engineering22
Data Driven Modeling
Processes are driven by data that arrives
UML Activity Diagram
Chapter 4 Requirements engineering23
Data Driven Modeling
Chapter 4 Requirements engineering24
Event Driven Modeling
Models behavior in response to events
Especially in real-time and embedded control systems
Chapter 4 Requirements engineering25
State Diagrams
Model event driven process
Notation Circles
indicate states May indicate action
Arcs indicate event trigger may indicate output
Chapter 4 Requirements engineering26
State Diagram Example
Chapter 4 Requirements engineering27
States
Chapter 4 Requirements engineering28
State Description
Waiting The oven is waiting for input. The display shows the current time.
Half power The oven power is set to 300 watts. The display shows ‘Half power’.
Full power The oven power is set to 600 watts. The display shows ‘Full power’.
Set time The cooking time is set to the user’s input value. The display shows the cooking time selected and is updated as the time is set.
Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows ‘Not ready’.
Enabled Oven operation is enabled. Interior oven light is off. Display shows ‘Ready to cook’.
Operation Oven in operation. Interior oven light is on. Display shows the timer countdown. On completion of cooking, the buzzer is sounded for five seconds. Oven light is on. Display shows ‘Cooking complete’ while buzzer is sounding.
Events
Chapter 4 Requirements engineering29
Stimulus Description
Half power The user has pressed the half-power button.
Full power The user has pressed the full-power button.
Timer The user has pressed one of the timer buttons.
Number The user has pressed a numeric key.
Door open The oven door switch is not closed.
Door closed The oven door switch is closed.
Start The user has pressed the Start button.
Cancel The user has pressed the Cancel button.
State Diagram
Graph structure
Can be characterized in tables – row contain State, trigger, new state
Chapter 4 Requirements engineering30
State Diagrams - Examples
Fax decoding Data driven
Printer console Driven by buttons, internal sensors
Power Plant Control System
Stopwatch Stop, start Lap time
Chapter 4 Requirements engineering31
Example
Alarm clock Three buttons Set time Set alarms Enable/disable alarm Change display – clock or alarm time Power Failure
Chapter 4 Requirements engineering32
Model Driven Engineering
Developer defines model
Implementation is automatically generated
Not in widespread use
Chapter 4 Requirements engineering33