OMG-OCUP2-ADV300 OMG Certified UML Professional 2 (OCUP 2) - Advanced Level Exam Practice Test

Page: 1 / 14
Total 90 questions
Question 1

Choose the correct answer:

Consider the following template Operation:

addElement (e : E)

Which Operation represents a binding of that template Operation?



Answer : A

The correct representation of a binding of the template operation addElement<E> with E being bound to the type Card is addElement (e : Card). This notation means that the template parameter E is being replaced by the concrete type Card, thus instantiating the template operation with that specific type. In UML, this instantiation does not require the bind keyword or the template brackets <> around the type in the operation signature itself; it is simply represented by using the concrete type as the type of the parameter in the operation. This usage is consistent with the UML 2.x Superstructure Specification, which explains how operations of a template classifier are instantiated when template parameters are bound to actual types.


Question 2

Choose the correct answer:

Which statement is correct about StateMachme Redefinition?



Answer : D

StateMachine Redefinition in UML allows for the specialization of a StateMachine by a derived Classifier. This is crucial as it ties into the broader capability of UML to specialize behaviors and classifiers:

A is incorrect; UML does discuss StateMachine Redefinition.

B describes one aspect of redefinition but is too narrow as it omits that redefinition can also redefine transitions and internal behaviors, not just states or events.

C describes more of an error correction or revision process, which is not specifically what StateMachine Redefinition is about.

D captures the essence of StateMachine Redefinition, emphasizing that it is a necessary extension of UML's capabilities to allow for specialization and refinement of classifiers and their behaviors.


UML Specification, Section on StateMachines

StateMachine Redefinition is further elaborated in UML 2.5 Documentation under the Behavior StateMachines sections.

Question 3

Choose the correct answer:

Which UML element specifies a set of formal parameters that will be substituted by actual parameters?



Answer : B

A template signature in UML specifies a set of formal parameters that can be substituted by actual parameters when a template is instantiated. This template signature is part of a templateable element, which is the element that can be parameterized using the template mechanism in UML. The template signature defines the formal template parameters that will be replaced by actual values or types when a bound element is created from the template. This concept is detailed in the UML 2.x Superstructure Specification, particularly in the sections describing templates and how they are used to create reusable and customizable model elements.


Question 4

Choose the correct answer:

Where does UML explicitly intend String Expression elements to be used?



Answer : D

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.


Question 5

Choose the correct answer: Consider the following definition:

Which statement is correct about elements referred to in the illustration?



Answer : D

In the diagram, 'mycarVehicle' represents a class that likely encapsulates the concept of a vehicle within the system being modeled. The elements within 'mycarVehicle' are properties that represent different parts of the car. The term 'wheels' is not explicitly shown in the diagram, but based on UML conventions and the context provided, it would be a property of the Vehicle class. This property would likely be associated with the 'frontleft' and 'frontrightwheels' parts of the car. In UML, properties represent structural features of a class that hold data values or references to other objects. The correctness of this answer is consistent with the principles found in the UML 2.x Superstructure Specification regarding the structural features of classes.


Question 6

Choose the correct answer:

Consider the following diagram fragment:

Which statement is correct about the diagram fragment?



Answer : D

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.


Question 7

Choose the correct answer: What does Protocol Conformance represent?



Answer : C

Protocol Conformance in UML is a relationship between protocol state machines that ensures consistency in behavior inheritance:

A . Incorrect as it describes a general-to-inherited relationship, which is not the focus of protocol conformance.

B . Incorrect, as it describes a relationship the wrong way around (general to nested).

C . Correct. Protocol Conformance ensures that a specific Protocol State Machine conforms to the rules and constraints specified by a redefined, more general Protocol State Machine.

D . Incorrect, because it generally describes conformance but does not specifically focus on the relationship between specific and general state machines in the context of protocols.


UML Specification: Protocol State Machines section.

Specifics of protocol conformance are detailed under state machine and classifier behaviors in the UML 2.5 Documentation.

Page:    1 / 14   
Total 90 questions