Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free OMG Certified UML Professional 2 (OCUP 2) - Advanced Level OMG-OCUP2-ADV300 Exam Questions

Last updated: · 13 practice questions with answers and explanations

Page: 1 / 9 Total 90 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Applies UML property redefinition and subsetted-property semantics in class models.

A logistics model has a general class `Shipment` with a property `items : Item [0..*]`. A specialized class `ReturnShipment` must identify the subset of those items that are actually returned; it must not introduce unrelated items. The model also needs to preserve the inherited `items` property for clients that work at the `Shipment` level. Which UML property design most directly expresses this requirement?

Correct Answer: D. Add `returnedItems : Item [0..*]` to `ReturnShipment` and give it a subsetted-property relationship to `Shipment::items`.
Explanation:

A subsetted property has values that are included among the values of the property it subsets, so `returnedItems` expresses the required subset while preserving the inherited `Shipment::items` feature. Redefinition in C changes the inherited feature's specialized meaning or constraints; it does not state that a distinct property contains only a subset. B replaces the inherited property rather than retaining both concepts. Aggregation in D concerns whole-part semantics and does not establish a subset relationship.

Question 2

New Single answer

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Distinguishes template parameter substitution from inheritance in UML classifier templates.

A modeling team defines a reusable `Cache` classifier whose key and value types are classifier template parameters. A particular subsystem needs a cache from `CustomerId` to `CustomerRecord`. The subsystem must use the template's defined structure and behavior without creating a specialized subtype or adding new features. Which model element represents that use most accurately?

Correct Answer: C. A bound element that substitutes `CustomerId` for `K` and `CustomerRecord` for `V`.
Explanation:

A bound element applies a template binding, supplying actual arguments for the formal parameters while retaining the template's modeled structure and behavior. Generalization in A creates a subtype relationship rather than binding the parameters. Classifier template parameters are not properties to redefine, so C confuses parameter substitution with feature redefinition. Realization in D expresses conformance to a specification, not substitution of actual template arguments.

Question 3

New Single answer

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Interprets UML multiplicities and uniqueness constraints on association-end properties.

An order-processing model links each `Order` to one or more `LineItem` instances. A line item may belong to at most one order, and its order must be present while the line item exists. The model also requires the collection of line items for an order to contain no duplicate instance. Which association-end multiplicities and property characteristics satisfy these requirements?

Correct Answer: C. At the `LineItem` end, `1..*`, unordered and unique; at the `Order` end, `1`.
Explanation:

The multiplicity at the line-item end gives each order one or more line items, and the end's default uniqueness can be stated explicitly as unique. The opposite end has multiplicity 1, requiring every line item to have exactly one order. A permits an unowned line item and allows an order to be absent; C permits an order with no line items; D has both defects and permits duplicate line-item references. Ordering is not required by the scenario.

Question 4

New Single answer

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Selects UML realization and interface usage for component contracts.

A deployment-independent architecture model contains a component that provides an `ISettlement` contract and requires an `IFraudCheck` contract. The design must show that the component offers the first interface and depends on an external provider for the second. The model is not intended to specify the component's internal classes. Which representation best communicates both contracts?

Correct Answer: A. Show an assembly connector between the component's required `IFraudCheck` interface and a provider, and a realization of `ISettlement` by the component.
Explanation:

A component can expose a provided interface through realization and declare a required interface that is connected to a compatible provider using an assembly connector. This communicates both the offered contract and the external dependency without imposing an internal-class view. A models ordinary features rather than component interface contracts. B uses generalization incorrectly and reverses the dependency direction. D indicates dependency but fails to distinguish what the component provides from what it requires.

Question 5

New Single answer

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Uses UML generalization sets to model completeness and disjointness constraints.

A product model classifies every `PaymentInstrument` as exactly one of `CardPayment`, `BankTransfer`, or `DigitalWallet`. New subclasses may be added later, so the current set of named subclasses must not be treated as exhaustive. The categories are mutually exclusive. Which generalization-set properties capture the current rule without claiming that all possible kinds have already been modeled?

Correct Answer: B. Set the generalization set to incomplete and disjoint.
Explanation:

Disjoint states that an instance cannot belong to more than one of the listed specific classifiers. Incomplete means the listed subclasses are not asserted to cover every possible `PaymentInstrument`, allowing additional subclasses later. A and C incorrectly declare the listed subclasses exhaustive. B allows an instance to belong to multiple listed categories, contrary to the mutual-exclusion requirement.

Question 6

New Multiple answers

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Identifies UML expression and value specifications for derived model features.

A billing model needs a read-only `netAmount` feature derived from `grossAmount` and `discount`. The derivation must be visible in the model as an expression, rather than implemented as stored data or left as an informal note. The model uses UML value and expression specifications for declarative constraints and derivations. Which TWO modeling decisions most directly meet these requirements? Select TWO.

Correct Answer: B. Use a `ValueSpecification` for the derivation and retain the derived property designation on `netAmount`.; D. Mark `netAmount` as derived and provide a `LiteralString` value specification containing a constraint-language expression for its derivation.
Explanation:

The derived designation indicates that the feature's value is computed rather than independently stored, while a value specification can hold the expression defining that derivation. B gives a concrete string-valued expression representation, and E states the core modeling pairing. A is an executable behavior approach but does not provide the requested expression-based derivation. C leaves the rule informal and stores the value. D misuses derived union, which concerns a union of redefined properties rather than arithmetic.

Question 7

New Single answer

Topic: Unified Modeling Language UML V2.5.1

Skill tested: Interprets UML collaboration roles and connectors in interaction models.

An interaction model describes a payment request passed from an `OnlineOrder` to a `PaymentGateway`, which then contacts a `RiskService`. The interaction should show the participating roles and the links over which messages can be exchanged, without asserting that these roles are structural properties of the classifiers that type them. Which modeling approach is most appropriate?

Correct Answer: C. Use a collaboration with typed roles and connectors between the roles, and define the interaction in that collaboration context.
Explanation:

A collaboration describes cooperating roles and the connectors that link them in a particular context; roles can be typed by classifiers without asserting that the links are permanent structural associations. B incorrectly turns interaction-specific connectivity into structural composition and does not itself specify message order. C can model component architecture, but connectors do not define the interaction's sequence. D is incorrect because collaboration roles can be typed by classifiers.

Question 8

New Single answer

Topic: Action Language for Foundational UML

Skill tested: Applies Alf lexical structure and statement syntax to action-language code.

A model-driven team writes an Alf action body that declares a local integer count, assigns it the value zero, and then returns it from an operation. The team wants the source to conform to Alf's lexical and statement conventions rather than merely resemble a general-purpose programming language. Which fragment best expresses the required sequence?

Correct Answer: B. `Integer count := 0; return count;`
Explanation:

Alf uses typed local variable declarations and the assignment operator `:=`; statements are terminated with semicolons, and a return statement returns the value. D combines those conventions. A uses `=` rather than Alf's assignment syntax. B uses a declaration form that is not the required Alf local-variable syntax and omits the statement terminator. C separates declaration from initialization using a form that does not match the declaration-and-initialization syntax used here.

Question 9

New Multiple answers

Topic: Action Language for Foundational UML

Skill tested: Selects Alf conformance requirements for UML operation behavior integration.

A development team is adding Alf bodies to operations in a UML model. It needs executable behavior to remain integrated with the modeled operations and their parameter and return types. The team also wants to avoid assuming that an Alf body can override UML semantics or silently accept type-inconsistent expressions. Which TWO practices are consistent with Alf's role and conformance model? Select TWO.

Correct Answer: A. Attach an Alf body to the relevant UML operation behavior and ensure its parameters and return value conform to the operation signature.; E. Treat Alf as a textual action language whose constructs map to executable UML actions and whose behavior must conform to the underlying UML model.
Explanation:

Alf provides a textual notation for UML actions and is intended to integrate with UML models. An operation body must conform to the operation's modeled signature, including parameter and result typing; it does not replace the classifier model or change the signature implicitly. A and C capture those principles. B overstates Alf's scope, while D invents implicit conversion behavior. E confuses operation behavior with structural signature changes, which must be made in the UML model.

Question 10

New Single answer

Topic: Action Language for Foundational UML

Skill tested: Diagnoses action-language name resolution through scope and visibility rules.

An Alf operation body contains a local variable named `status`, while the context classifier also has a property named `status`. A later expression refers to `status` without qualification, but the intended value is the classifier property. The expression is otherwise type-correct, and the team cannot rename the local variable because it is part of a generated interface. What is the best correction?

Correct Answer: D. Qualify the property reference through the context's `self` object.
Explanation:

A reference to `self.status` explicitly selects the property of the current context object, avoiding ambiguity with the local variable in scope. Changing visibility does not resolve name shadowing and may make access invalid. Declaring another same-named local worsens the ambiguity or violates local declaration rules. Moving the expression into a nested block does not make a classifier feature take precedence over an in-scope local.

Question 11

New Multiple answers

Topic: Action Language for Foundational UML

Skill tested: Integrates Alf action bodies with UML activity and operation semantics.

A team is migrating an existing UML activity implementation to Alf while preserving model meaning. The operation already has a typed input parameter, a typed result, and an activity specified as its method. The implementation must remain understandable to UML tools that operate on the model, and the team must not create a second, conflicting behavioral definition. Which TWO actions are most appropriate? Select TWO.

Correct Answer: A. Represent the Alf text as a body for the operation's behavior and maintain its conformance with the existing operation signature.; E. Ensure the Alf body denotes UML actions and is associated with the operation behavior rather than modeled as unrelated documentation.
Explanation:

Alf is a textual notation for UML actions, so its body should be integrated as the operation's behavior and remain consistent with the operation's modeled parameters and result. A and C preserve that correspondence and keep the behavior available as part of the UML model. B discards the modeled signature. D creates competing behavior definitions rather than a single authoritative method. E incorrectly claims that Alf replaces UML's behavioral and structural metamodel.

Question 12

New Single answer

Topic: Semantic of Foundational Subset for Executable UML Models

Skill tested: Applies fUML execution semantics to object creation and feature values.

During a model-based simulation, an action creates a new instance of a class with a required single-valued attribute. The class's structural feature has a default value specified in the model, and the execution trace shows the object before any explicit write action to that feature. Which interpretation is consistent with fUML's execution model?

Correct Answer: D. The object is created with feature values established according to the structural feature's default, subject to the applicable model semantics.
Explanation:

In fUML execution, object creation establishes an object and initializes its feature values according to the structural features and their applicable default-value semantics. A model default is not merely a deferred read-time computation, nor does it require the creation action to list the feature as an argument. Thus A, B, and D incorrectly treat the default as absent or as requiring an explicit write.

Question 13

New Single answer

Topic: Semantic of Foundational Subset for Executable UML Models

Skill tested: Determines executable model behavior from fUML control-flow and token semantics.

An executable activity has an initial node followed by a decision node with two outgoing flows. Each flow has a guard, and one flow leads to completion while the other leads to an action that records an exception. In a test run, the decision input satisfies neither guard, and no outgoing flow has an `else` designation. What is the most defensible diagnosis of the execution?

Correct Answer: C. The decision cannot offer a token on either guarded flow, so the downstream action and completion path do not proceed through that decision.
Explanation:

A decision node offers its input token along an outgoing flow whose guard is true; absent a true guard or an `else` flow, there is no eligible guarded path. The exception action does not run unless its flow is enabled, and the other path does not complete the activity through that decision. A assumes arbitrary selection, C invents an implicit `else`, and D ignores the role of guards in control flow.