Software Construction: UML Part 2
Cards to learn UML
Cards to learn UML
-
- 1 / 22
-
Lernkarten
Use Case Diagrams (Definition)
It represents the functionality of the system from the point of the user of that system.
A use case is a generic description of an entire transaction involving several actors. It is a snapshot of one aspect of your system. They can drive domain modeling by highlighting the key concepts.
The sum of all use cases is the external picture of your system (Important for your clients!).
A use case diagram presents a set of use cases (ellipses) and the external actors that interact with the system.
Dependencies and associations between use cases may be indicated.
Scenarios (Definition)
A scenario is an instance of a use case showing a typical example of its execution.
Scenarios can be presented in UML using either sequence diagrams or collaboration diagrams.
A scenario only describes an example of a use case, conditionality cannot be expressed.
Message Labels (Collaboration Diagrams)
Messages from one object to another are labelled with text strings showing the direction of message flow and information indicating the message sequence.
Prior messages from other threads (e.g., “[A1.3, B6.7.1]”) (only needed in concurrent flow of control)
Dot-separated list of sequencing elements
- Sequencing integer (e.g., “3.1.2” is invoked by “3.1” and follows “3.1.1”)
- Letter indicating concurrent threads (e.g., “1.2a” and “1.2b”)
- Iteration indicator (e.g., “1.1*[i=1..n]”)
- Conditional indicator (e.g., “2.3 [#items = 0]”)
Return value binding (e.g. “status := true”)
Message name (event or operation name)
Argument list
Statechart Diagrams (Definition)
It represents the behaviour of a class in terms of (the evolution of) its state.
A statechart diagram describes the temporal evolution of an object of a given class in response to interactions with other objects inside or outside the system.
An event is a one-way (asynchronous) communication from one object to another (atomic / non-interruptible). It may cause object to make a transition between states.
A state is a period of tie during which an object is waiting for an event to occur. It is depicted by a rounded box and may be nested.
State Box with Regions (Statechart Diagram)
The entry event occurs whenever a transition is made into this state, and the exit operation is triggered when a transition is made out of this state.
The help, clear & character events (internal transitions) cause internal transitions with no change of state, so entry & exit operations are not performed.
Transitions (Statechart diagrams)
A transition is a response to an external event received by an object in a given state. It may invoke an operation & cause the object to change state. Also it may send an event to an external object.
Transition syntax (each part is optional): event(arguments) [condition] / ^target.sendEvent operation (arguments).
External transitions label arcs between states.
Internal transitions are part of the triggered operations of a state.
Operations & Activities (Statechart diagrams)
An operation is an atomic action invoked by a transition (Entry & Exit operations can be associated with states).
An activity is an ongoing operation that takes place while object is in a given state (Modeled as internal transitions labeled with the pseudo-event do).
Branching & Merching (Statechart diagrams)
Entering concurrent substates: Entering a state with concurrent substates means that each of the substates is entered concurrently (one logical thread per substate).
Leaving concurrent substates: A labeled transition out of any of the substates terminates all of the substates. An unlabeled transition out of the overall state waits for all the substates to terminate.