UML Flashcards
Define: Use Case
A list of event steps defining the interactions between an actor and a system
Ultimate criterion: if it ends with a value for the user, it is a use case
Define: Essential use case
Describes user intentions and system responsibilities
Define: System use case
Describes user actions and system responses at a technical level
What are the 3 UML use case relationships
Includes:
a common subpart is used within a containing use case
Extends:
A variant or exceptional situation that extends the normal case
Generalisation:
Several special use cases generalised to a common general description
Capturing alternative execution paths in a communication diagram
with guards and letter notation
Using interaction diagrams in implementation phase
Creating method skeletons
Using interaction diagrams in the testing phase
Generate test cases
Value of super states
Reduce complexity of system by hiding state information
Define: Super-state
The parent state of one or multiple substates
Define: OCL
Derivative of UML describing rules for UML models
Uses of OCL
Provide constraints on:
Limits, Uniqueness, Consistency and Contracts
OCL Limits
Constrain values to certain ranges
OCL Uniqueness
Constrain instance values to be unique
OCL Consistency
Express invariants on data structures
OCL contracts
Pre/post conditions for operations
OCL invariants
constraint that states a condition that must always be met by all instances of the component, type or interface. Invariants must be true all the time
When to use OCL
To express restrictions that can’t be shown with visual notation only
How do substates reduce complexity of state diagram
Allows for single superstate with multiple substate variations I.e. concurrent substates,
Situation for textual constraints in a diagram (2)
- textual constraints are easier to read than standard logical notations
- “loose semantics” allows admissible solutions to the constraint, without prescribing a specific solution
Properties of a good class diagram
Honestly, not sure
Simple? Let me know what you think, Raz (If you see this)
Why are class diagrams created at the analysis stage of engineering
Helps understand the requirements of the domain and identify its components
Sequence diagram vs Communication diagram
Sequence diagram shows how interactions progress with respect to time
Communication diagram only shows in what order interactions progress
UMLs approach to container types (I.e. Set)
On the association line, example:
Book: 1 {readOnly} has -> {ordered, unique} * :Reservation
Benefits of association classes/high arity association
No multiple relationships between two objects
High arity associations (aggregation in between) give a symmetric contribution to relationship
UML language/notation features to deal with complexity (3)
Superstates - reduce complexity by information hiding
Textual constraints?
Not sure, again
Qualified Association
Kind of like an enum, I guess. Ex. Car has wheels, wheels have positions between them and cars