OMG-OCUP2-FOUND100 practice question 5 of 15
In UML modeling, what is a Constraint?
Full set: 89 questionsAccording to the official OMG UML specification, a Constraint is a condition or restriction placed on one or more elements of a model. It is expressed as a Boolean expression that must evaluate to true for the model to be considered well-formed. This means the condition is a mandatory rule that must be satisfied. Constraints are used to specify invariants, preconditions, and postconditions, all of which are non-negotiable rules within the model's logic.
B. The word "should" implies optionality. A constraint is a mandatory rule that must be met.
C. This describes the effect of an operation or a state transition, which causes change, whereas a constraint restricts valid states.
D. This is too narrow. Constraints can be applied to any model element (e.g., operations, use cases) in any diagram, not just classes in a class diagram.
- Object Management Group. (2017). OMG Unified Modeling Language (OMG UML), Superstructure, Version 2.5.1. OMG Document Number formal/2017-12-05. Section 7.6.1, "Summary," p. 35. The text states, "A Constraint is a condition or restriction represented as a Boolean expression, which must be true for the model to be well-formed."
- Pender, T. (2003). UML Bible. Wiley Publishing. Chapter 5, "The Class Diagram," section on Constraints.
Keep practicing
Take the free OMG-OCUP2-FOUND100 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other OMG-OCUP2-FOUND100 practice questions
- Question 4Which scenario would be modeled most appropriately in a state machine?
- Question 7Which statement is correct regarding object (lows and control flows?
- Question 11Which category of stakeholders should have prime responsibility for making decisions on t…
- Question 12Which semantics differentiate a pseudostate from a regular state in a UML state machine?
- Question 13When is a state machine for an object created and ready to accept events?
- Question 14Which UML term pair captures complementary ways of looking at a relationship?
