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

Page 4 of 24

Choose the correct answer :
Let E be a UML 2.5 NamedElement with a name property of '_name" and with a nameExpression property of "_expresslon".
Which one presentation or set of presentations of the name of E in a tool conforms to the OMG specification?

  1. _name
  2. _expression
  3. S_expression$ OR _name
  4. S_expression$
    _expression
    OR
    _name:_expressk>n
  5. UML 2.5 no longer includes a nameExpression properly within NamedElements.

Answer(s): C

Explanation:

In UML 2.5, a NamedElement can have a name attribute, which is a string representing the element's name, and a nameExpression attribute, which is a ValueSpecification used to specify the element's name in a more dynamic way. The presentation of the name of a NamedElement in a tool that conforms to the OMG specification could either be the literal name (as specified in the name attribute) or the evaluated expression from the nameExpression property. Therefore, a tool may choose to present either the simple name or the evaluated expression or allow toggling between the two. The specification does not mandate a single fixed presentation, allowing for flexibility in how tools display the name. This conforms to the OMG's UML 2.5 specification, which describes the properties of NamedElement and their presentations within tools.



Choose the correct answer :
In a model of a commercial transaction, actors might exchange euros, pesos, and dollars Which figure illustrates compliant use of UML information items for these currency exchanges?



  1. Figure 1
  2. Figure 2
  3. Figure 3
  4. Figure 4

Answer(s): B

Explanation:

In UML, an InformationItem represents an abstraction of all those elements in a UML model that have an information-bearing feature. It is depicted as a classifier with the keyword «informationItem». An InformationItem does not have direct instances and serves as a mechanism to handle unspecified, untyped information in a model. In the context of a commercial transaction model, currencies such as euros, pesos, and dollars can be abstractly represented as InformationItems to signify that they are used as a form of data exchange but without specifying the concrete structure or data type. Figure 2 correctly uses InformationItem notation, with the «informationItem» keyword and the directed association pointing from the Currency InformationItem to the Euro, Peso, and Dollar, which are likely representations or manifestations of the Currency. This complies with the UML specification for representing abstract entities in models that are involved in the exchange or flow of information.



Choose the correct answer :
Consider the following diagram fragment:



Which statement is correct about the diagram fragment?

  1. The diagram fragment is a valid UML diagram.
  2. To use the template List. Company must be a bound element to List.
  3. List cannot be used by Company unless Company is also a template.
  4. List cannot be used as a data type, only a bound element to List can.

Answer(s): D

Explanation:

The provided diagram fragment seems to indicate a situation involving a template. In UML, a template is a parameterizable element, and a bound element is a specific manifestation of that template wherein the parameters have been replaced with actual values or types. If 'List' is a template class, it cannot be directly used as a type. Instead, one must use a bound element of the List, meaning the template parameters of List must be bound to actual types before it can be used.

For instance, if List is a template expecting a type T, then a concrete class might be List<Customer> or List<Order>, where Customer or Order are actual types replacing the template parameter T. This use of templates and bound elements is according to the UML specification, which details how templates are defined and instantiated within UML models.



Choose the correct answer :
A group of programming language designers want to create classes that model typical data collections such as arrays, lists, maps. etc.
Their design must satisfy three conditions:
1. The collections must be parameterizable to support any data type.

2. Some collections must inherit from other collections to leverage reuse of functionality.
3. The implementation of the collection functions cannot be overridden.
Which UML concept should these designers use?

  1. Classes
  2. Interfaces
  3. Power Types
  4. Class Templates

Answer(s): D

Explanation:

In UML, class templates are the concept used to create classes that can be parameterized with different data types. This feature satisfies the first condition, allowing collections to support any data type. Class templates can be specialized, fulfilling the second condition, where some collections can inherit from others, thus enabling the reuse of functionality. Additionally, UML allows for operations to be defined in such a way that they cannot be overridden, by specifying them as non-virtual or final, which meets the third condition. Therefore, the use of class templates would be the most suitable approach for the design criteria specified by the programming language designers. This approach is consistent with the capabilities of class templates as described in the UML 2.x Superstructure Specification.






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

OMG-OCUP2-ADV300 Discussions & Posts