Lecture 9 Flashcards
What is a behavioural model?
Behavioral models capture a system’s behavior, i.e., its (permissible/exemplary) processes
and inner workings as they can (theoretically) be perceived when executing the system.
Name characteristcs of an activity diagram?
- Behavioral Diagram
- Modeling of step-wise activities and actions
- Describe behavior in terms of
processes and workflows.
Good for:
* Computational and organizational processes.
* Can describe parallel processes and workflows.
* Refine use cases by specifying behavior (including actors).
What is software and what is hardware?
Software:
- (Software) system and subsystem
- Component
- Class
- Attribute
- Method
Hardware (computer):
- Server
- Laptop
- Harddisk
- Display
- Robot
- Sensor
Explain and draw these four:
* Action
* Transition
* Inital node
* final node
- Active step: By system or actor (box with soft edges)
- Transition: Connects actions (line with arrow)
- Initial Node: Start of execution, Exactly one (filled out node)
- Final Node: End of execution Potentially many (not filled out node)
What behavioural UML models are there?
Activity diagram
State machine diagram
Sequence diagram
(idk use case????)
What is forking - draw what it looks like
- Start of parallelism
- Start all outgoing transitions in parallel - two or more arrow goes out
- Looks like a long black line
What is a join?
- End of parallelism
- Continue when all incoming transitions
were complete - Looks the same as a fork
What is a swim lake? What does it look like
Attribute actions to actors, big box around the different activities. In the top write the actor
Name the elements in an UML activity diagram.
Action, Transition, Initial Node, Final Node, Decision, Fork, Join, Swim Lane
What is fork, join and swim lane?
Fork: Splits the control flow into multiple parallel flows according to outgoing transitions (1 becomes multiple)
Join: Unifies multiple parallel incoming transitions to one outgoing control flow when all transitions are complete (multiple becomes 1)
Swimlane: Attributes actions to specific actors or organizational units.
Name characteristitcs of State Machine Diagrams:
- Behavioral Diagram
- Modeling of protocols based on discrete
system states. - Describe reaction of system to triggers for current state.
Good for:
* Many systems based on states (reactive systems, GUIs etc.)
* Can be analyzed well.
* Implementation is straight forward.
What is trigger, guard, action and the syntax for UML state machine diagrams?
Trigger: Event that occurs to cause transition to fire: meteoriteHits
Guard: Condition under which
transition can fire: [currency == Euro]
Action: Performed when transition
fires: /modifyInternalValues()
Syntax: Trigger [Guard] /Action
her
What is the difference between state machine diagrams and activity diagrams?
However, the difference between the two lies in what the modeling focus is put on: In a State Machine Diagram, actions may be annotated on transition whereas
In an Activity Diagram, they are the primarily
modeled entity. Vice versa, in an Activity Diagrams, the states of the system appear (only
briefly) in between transitioning from one action to the next.
Mention the UML state machine elements
State: Current “mode” of system (how it reacts to certain triggers)
Transition: Control flow between actions
Initial status: Start of state machine diagram
(exactly one)
Final state: Start of state machine diagram
(exactly one)
Decision: Selection of one of the outgoing
transitions via their guards.
her
Desribes these - draw these:
- State - Current “mode” of system
- Transition - Connects states
- Initial State - Start of execution, Exactly one
- Final State - End of execution, Potentially many
What is termination in sequence diagram?
Ends the lifeline of an entity, and is an explicit signal that an entity is no longer used. It’s denoted with an x.
Give an example of an UML sequence diagram?
Charactiristics of sequence diagrams:
- Behavioral Diagram
- Modeling of calls in example scenario
- Describe detailed calls and their order on an example scenario
Good for:
* Depict example paths through the system (testing!)
* Show finer details of
algorithms.
What is synchronous message, asynchronous message and return message?
Synchronous message: Communication between entities. Blocks sender until operation at receiver was performed
Asynchronous message: Communication between entities. Does not block sender while operation at receiver is being performed
Return message: Result of the operation performed after receiving a message. Optional.
Her
How are sequence diagrams different from state machine and activity diagrams?
Unlike a UML Activity Diagram or a UML State Machine Diagram, a UML Sequence Diagram is not expressive enough to fully specify the behavior for a system as it shows only an example scenario.
Explain these in sequence diagrams:
* lifeline
* Activation Box
* Message
* Return Message
- Lifeline: From top to bottom, How long an entity exists
- Activation Box: Active part of lifeline, Can be nested
- Message: Active communication with other entity
- Return Message: Response to a received message, Optional
What are the different uses of UML diagrams?
Sketch: Informal, few details, understand the domain, communication
Blueprint: Specification, contains many details, a manual implementation with common
sense
Development language: Full specification, “full” details, automatic implementation through generators