U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

OMG-OCUP2-FOUND100 Exam - Topic 8 Question 46 Discussion

Choose the correct answer: OpaqueExpression can use which languages?
D) any language
A) onlyOCL
B) only programming languages
C) only Mathematical Expressions

OMG-OCUP2-FOUND100 Exam - Topic 8 Question 46 Discussion

Actual exam question for OMG's OMG-OCUP2-FOUND100 exam
Question #: 46
Topic #: 8
[All OMG-OCUP2-FOUND100 Questions]

Choose the correct answer: OpaqueExpression can use which languages?

Show Suggested Answer Hide Answer
Suggested Answer: D

An OpaqueExpression in UML 2 is used to specify behavior in a textual form when it is not necessary to specify which language is used, or when it is not possible to use graphical notation. According to the UML 2 specification, an OpaqueExpression is not limited to any particular language; it can represent expressions written in any language.

The key characteristics of an OpaqueExpression are as follows:

The 'body' of an OpaqueExpression is a sequence of strings, where each string could be written in a different language. This means it has the capacity to include multiple languages simultaneously.

The 'language' attribute is optional and is used to indicate the languages of the respective 'body' parts.

The allowance for any language is clearly stated in the UML 2 Infrastructure Specification. OpaqueExpression is designed to be a flexible way to capture expressions that are not readily expressible in UML or when using a language outside the scope of UML (e.g., mathematical expressions, programming languages, or other domain-specific languages).


Contribute your Thoughts:

0/2000 characters
Shasta
1 day ago
I remember practicing a question about OpaqueExpression, and it mentioned something about OCL specifically. Could it be that it only uses OCL?
upvoted 0 times
...
Kristal
2 months ago
I think OpaqueExpression can use any language, but I’m not entirely sure. It seems like it could be more flexible than just one type.
upvoted 0 times
...

Save Cancel