Free OMG-OCUP2-ADV300 Exam Braindumps (page: 3)

Page 2 of 24

Choose the correct answer :
Where does UML explicitly intend String Expression elements to be used?

  1. as (he ValueSpecifications for the nameExpressions of ParameterableElements within Template specifications
  2. as the model the author chooses for the specification of custom dynamically-generated names for any NamedElement
  3. whenever an OpaqueExpression form of a ValueSpecification needs to specify an expression that operates on String instances
  4. The specification has no metaclass StnngExpression and so no use of StringExpression is explicitly intended.

Answer(s): D

Explanation:

In UML, ValueSpecifications are used to specify the value of an element. The UML 2 Specification does not define a metaclass named StringExpression. Instead, it provides a metaclass named OpaqueExpression, which can be used when an expression is written in a language that is not directly interpretable by the model. Since there is no metaclass called StringExpression in the UML 2 Specification, there is no explicitly intended use for it within the UML metamodel. The absence of this metaclass suggests that any use of a concept called "StringExpression" would not conform to standard UML 2 practices and would likely be part of an extension or profile, not the core UML metamodel.



Choose the correct answer :
What does the UML specification say about choosing between a MOF-based metamodel and a UML profile?

  1. It is not always clear when to use one approach over the other; this decision must be domain- specific
  2. It is always good to opt for metamodeling when the metamodel is large and the domain is inherently complex such as the database domain.
  3. Since UML extends MOF. it is always preferable to start by extending MOF and. if this turns out to be complex, then shift to extending UML.
  4. Extending UML should be favored because of the fact that there are several tools that support UML profiling, which is not the case for MOF.

Answer(s): A

Explanation:

The UML (Unified Modeling Language) specification, which is a part of the MOF (Meta-Object Facility) framework, suggests that the choice between creating a MOF-based metamodel and a UML profile depends on the specific needs of the domain being modeled. A MOF-based metamodel might be more appropriate for domains that require defining a completely new set of modeling concepts, whereas a UML profile is suitable for domains where the extension of existing UML concepts is sufficient. Since the specification recognizes the variability in modeling requirements across different domains, it emphasizes the importance of understanding the domain to make an informed decision on the modeling approach. The UML specification, therefore, does not prescribe a one-size-fits-all solution but rather leaves the decision to the modeler, based on the domain-specific requirements.



Choose the correct answer :
Consider the following diagram fragment:



What is the signature of the class template List?

  1. List
  2. T[0..n]
  3. The ordered set {T. n: Integer}
  4. <T -> Customer, n -> 2000> or <T -> Order, n - >10000>

Answer(s): C

Explanation:

The class template List shown in the diagram fragment is a parametrized class with two template parameters: T and n. The signature of the class template includes both of these parameters. The template parameter T represents a type that can be bound to a specific class when the template is instantiated, while n represents an integer value that specifies the multiplicity of elements that can be contained in the list. Therefore, the signature of the class template List is the ordered set {T, n:
Integer}, which includes both the type parameter T and the integer parameter n indicating the maximum number of elements the list can hold.



Choose the correct answer :
Consider the following profile:



Which statement is true?

  1. Each instance of Class must be linked to exactly one instance of DisplayArea, Frame, or Form.
  2. Each instance of Class must be linked to at most one instance of DisplayArea. Frame, or Form.
  3. Each instance of Class must be linked to exactly one instance of DisplayArea. Frame, and Form.
  4. Instances of Class or its subclasses do not have to be linked to instances of DisplayArea. Frame, or Form.
  5. The diagram is incorrect because a required extension cannot be applied to a stereotype inheritance hierarchy.

Answer(s): D

Explanation:

The UML diagram fragment provided shows a UML profile with a required extension from the metaclass Class to the stereotype DisplayArea, which in turn has two subclasses Frame and Form. The use of {required} indicates that whenever an instance of Class is extended by the DisplayArea stereotype, it becomes mandatory to do so. However, this does not enforce that every instance of Class must be linked to DisplayArea or its subclasses (Frame or Form). It only means that if the DisplayArea stereotype is applied, it is required. Therefore, there is no obligation for every instance of Class or its subclasses to be stereotyped as DisplayArea, Frame, or Form. It's also worth noting that the last option (E) could be considered true in some interpretations of UML, but given the options provided and common UML practices, option D is more accurate.






Post your Comments and Discuss OMG OMG-OCUP2-ADV300 exam with other Community members:

OMG-OCUP2-ADV300 Discussions & Posts