SEslide 2
SEslide 2
SEslide 2
Modeling
• What is Modeling?
• Use case diagram
• Class diagram
• Sequence diagram
• State diagram
• Activity diagram
System perspectives
• Context models
• Interaction models
• Structural models
• Behavioral models
Lecture-2
Model-driven Engineering
• Model-driven Architecture – MDA
• MDA Model Levels
• MDA Transformations
• Executable UML
Lecture 1
. Example: map
Street
software development
Analysis
understand the
functionality of the system Model
. Represented by Unified
Code
Modeling Language –
Transformation
Generation
Rumpe, Bernhard. "Agile modeling with the UML." The potential uses of UML-models
Radical Innovations of Software and Systems
Engineering in the Future. Springer Berlin
Heidelberg, 2004. 297-309. Chapter 5 System modeling
6
Systems, Models and Views
* *
Described by Depicted by
Airplane: System
Use Case
diagram
Class
diagram
Activity
diagram
UML
diagrams
Sequence
diagram
State
diagram
Package
support requirements
elicitation Actor
. Actors
. Represent roles i.e. a type of user of the system
. Use cases
. Represent a sequence of interaction for a type of functionality
. Use case model
. The set of all use cases
. A complete description of the functionality of the system and
its environment
ID: UC-2
Title: Classify Recommendation
Main Success Scenario: 1. Explainer gets the filtered recommendation from Filter recommendation component.
2. It accesses to concept dictionary for classification
3. It classifies the recommendation into either every-day or scientific
4. It provides the classified recommendation to Explanation module.
. <<extends>>
Passenger re presen excep
relationships
s e ldom i voked tional
cases. or
PurchaseTicket . Example:
. Cancel
<<extends>> <<extends>> . OutofOrder
OutOfOrder
Cancel
. <<includes>> relationship
Passenger represents behavior that
is factored out of the use
case.
PurchaseMultiCard
. <<includes>> behavior is
PurchaseSingleTicket
<<includes>> factored out for reuse.
<<includes>> . Example:
. CollectMoney
CollectMoney
behavior in terms of
interactions
between system’s Message
components
. Interactions
between objects
are indicated by Activation
http://wc1.smartdraw.com/examples/content
/examples/06_software_design/uml_diagram
s/shopping_cart_sequence_diagram_l.jpg Chapter 5 System modeling
19
Class diagrams
Class
TarifSchedule
Name TarifSchedule
Array zone2price
TarifSchedule List getZones()
Attributes
zone2price Float getPrice(Zone)
getZones()
getPrice() Signature
Operations
Multiplicity
Watch
1 1 1 1
2 1 2 1
PushButton LCDDisplay Battery Time
state blinkIdx load now
push() blinkSeconds()
release() blinkMinutes()
blinkHours()
stopBlinking()
referesh()
Generalization
Child class
Child class
htt ps://subversion.american.edu/aisaac/
notes/images/uml-class-diagram.png Chapter 5 System modeling
24
Object class aggregation models
Patient record
1 1
1 1 ..
*
Patient Consultation
htt p://www-acad.sheridanc.on.ca/~jollymor/
prog24178/images/compAgg.jpg Chapter 5 System modeling
27
State diagrams
Initial state
Event
Final state
http://agilemodeling.com/images/style/
stateChartDiagramTopLevel.gif Chapter 5 System modeling 28
Activity diagrams
Notify
Fire Chief
Notify
Police Chief
Lecture 2
Structural - Model the organi zation of a system or the struc ture of the data that
is processed by the syste m
perspective
- Structural models
Behavioral - Model the dynamic behavior of the system and how it responds to
perspective events
- Behavioral models, State machine models
External
perspective
Behavioral
perspective
System
perspectives
Interaction
perspective
Structural
perspective
<system>
Patient record
system
<system> <system>
Management
Admissions
reporting
system
system
<system>
MHC-PMS
<system> <system>
HC statistics Prescription
system system
<system>
Appointments
system
[not available]
Transfer to
Confirm police station
Find Source
Detention
place
Decision Transfer to
secure Inform social
[available] care
hospital
[dangerous]
Inform next
Inform of kin
Patient of
rights
Update
Record register
Detention
Admit to
Decision
Hospital
[not
dangerous]
<System> <System>
<System>
MHC-PMS MHC-PMS
Admissions system
. Dynamic Model
. Show the organization of the system when it
is executing
types
. Data
. Some data arrives that is to be
Stimuli
processed by the system
types
. Events
. Some event happens that triggers
system processing Events
Calculate
insulin
delivery
Calculate Insulin
Pump Control
Insulin pump Control pump pump
commands requirement
commands
Fillin() Validate()
[Validation OK]
Update(amount)
Save()
Send()
Stimulus Description
Half power The user has pressed the half-power button.
Computation
independent
model (CIM)
MDA
Platform Platform
specific independent
model (PSM) model (PIM)
Platform -- Transformation
Used in functional (akainto
of PIM analysis) patterns
multiple application platform PSM layers
specific
- Each layer of PSM adds some platform-specific detail
model (PSM)
- Used in technical (aka Design / Implementation) patterns
htt p://www.idt.mdh.se/utbildning/exjobb/files/
TR0962 5 Model_Based_Testing_final.ppt Chapter 5 System modeling
65
Executable UML
Domain models
Class models
State models