OMG-OCUP2-FOUND100 OMG Certified UML Professional 2 (OCUP 2) - Foundation Level Exam Practice Test

Page: 1 / 14
Total 90 questions
Question 1

Choose the correct answer:

The BchaviorA state machine shown below is at rest in state s1 and the value of x Is 0.

If a signalA event occurs, what is the state machine's subsequent behavior?



Answer : C

The image showcases a state machine named 'BehaviorA'. It consists of two states: s1 and s2. There's also a transition labeled 'signalA' connecting these states. However, a guard condition, '[x > 0]' is placed on the transition. This indicates that the signalA event will only trigger the transition if the expression x > 0 evaluates to true.

In the scenario you described, the state machine is currently in state s1, and the value of x is 0. Since the guard condition '[x > 0]' is not satisfied (because x is 0), the signalA event will not trigger a transition to state s2.

Here's a breakdown of why other options are incorrect:

Option A (The state machine will transition to state s2 and execute ActivityA during the transition) is not valid because the guard condition prevents the transition.

Option B (The state machine will execute ActivityA and remain in state s1) is incorrect as ActivityA is only associated with the transition, which isn't happening in this case.

Option D (The state machine will remain in state s1, and processing of the signalA event occurrence will be deferred until either the value of x changes or the state machine changes state) is not entirely accurate. While the state machine remains in s1, the processing of the signalA event is consumed immediately, not deferred.

Therefore, considering the state machine's visual representation and the guard condition, option C best describes the state machine's behavior. The signalA event is acknowledged but has no effect because the transition requirements aren't met.


Question 2

Choose the correct answer:

Which one of the following is a Behavioral Feature?



Answer : C

In UML, a behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances. A behavioral feature is implemented (realized) by a method. Operations are a kind of behavioral feature; they are the specifications of transformations or queries that can be requested from an object of the classifier.

Here's why the other options are not correct:

A) 'Method' is not a behavioral feature; it is a realization of one. B) 'Function' is more of a programming concept than a UML term and would likely be modeled as an operation if it's part of a classifier. D) 'Constraint' is not a behavioral feature but a restriction on some aspect of a classifier or a stereotype. E) 'Method Invocation' is not a feature; it's an action that invokes a method. F) 'Classifier behavior' is a broader concept that defines the behavior characteristic of classifiers as a whole, not a behavioral feature in itself.

Therefore, the correct answer is:

C . Operation


Question 3

Choose the correct answer:

Consider the following diagram:

Which statement is always true in the diagram?



Answer : A

The diagram shows a UML Sequence Diagram where two messages are being exchanged between lifelines representing instances of objects: m(C) is being sent from v1 to v2, and m(D) is being sent back from v2 to v1.

In a sequence diagram, the vertical order of message arrows shows the sequence of interactions, with time proceeding down the page. Since the message m(C) is shown above m(D), this means that m(C) occurs before m(D). The receipt of m(C) by v2[B] must therefore occur before v2[B] can send m(D) back to v1[B].

Therefore, the statement 'Receiving m(C) must come before sending m(D)' is always true in this diagram.

B, C, and D are not necessarily true based on the diagram alone: B) 'Sending m(D) is the first occurrence of this scenario' is not depicted. C) 'Receiving m(D) is the last occurrence of this scenario' is also not depicted. D) 'All occurrences of v[1] will happen before all occurrences of v[3]' is not something we can infer from this diagram since v[3] is not involved in the interactions shown.

Therefore, the correct answer is:

A . Receiving m(C) must come before sending m(D).


Question 4

Choose the correct answer:

Consider the following diagram:

Which statement is true based on this specification of InteractionF?



Answer : C

The sequence diagram provided shows two messages being sent: m2() and m1(). The vertical placement of messages on a sequence diagram typically indicates the order of message passing; however, if there is no horizontal line connecting the lifelines or an explicit ordering constraint provided, it suggests that the messages are asynchronous and there is no specified order between them.

In this diagram, there is no horizontal line connecting the lifelines for o2 and o3, nor is there any other notation that would imply a strict ordering. This means that the messages m2() and m1() can occur in any order, and the interaction is still considered valid.

Therefore, the correct answer is:

C . An execution of InteractionF can be valid no matter the order in which o2 and o3 receive their respective messages.


Question 5

Choose the correct answer:

Consider the following diagram:

What is the name of the property that the lifeline represents in the Start Sensor Device Driver interaction?



Answer : C

In a UML sequence diagram, a lifeline is represented by a box at the top of a dashed line. The box contains the name of the lifeline and can optionally include the object name, a colon, and the class name or the type (if the lifeline represents a specific instance of a class or type).

In the provided sequence diagram, the lifeline has the following notation:

sensorDriver [x-axisGyro] : DeviceDriver

This notation includes three parts:

sensorDriver is the name of the lifeline, which represents the identity of the participating element.

[x-axisGyro] is a selector that specifies that the lifeline represents a specific object within a set of similar objects.

DeviceDriver is the type of the object that the lifeline represents.

Based on this, the name of the property that the lifeline represents in the 'Start Sensor Device Driver' interaction is sensorDriver.

Therefore, the correct answer is:

C . sensorDriver


Question 6

Choose the correct answer:

The Use Case "Manage customer information" is a high-level description of how to handle customers and their dat

a. Specific descriptions of how to add or delete a customer, or update a customer's information, are represented by the Use Cases "Add new customer", "Delete customer", and "Update customer information".

Which diagram depicts this scenario?

A)

B)

C)

D)



Answer : B

In the context of the given scenario, the Use Case 'Manage customer information' appears to be a general use case that encompasses the functionalities of adding, deleting, and updating customer information. The specific functionalities are represented by separate use cases, namely 'Add new customer', 'Delete customer', and 'Update customer information'.

In UML Use Case diagrams, the include relationship should be used when a use case implicitly requires the capabilities of another. However, when the use case is a higher-level description that can be further elaborated into more specific use cases, the extend relationship is more appropriate, but in the reverse direction as shown in Option B.

Option B correctly uses the generalization relationship which is not depicted by any arrows or lines but by a whole-part structure, indicating that the specific use cases are a part of the general 'Manage customer information' use case.

Option A shows the 'Manage customer information' use case extending the specific use cases, which is not correct given the context.

Option C incorrectly uses include relationships, implying that the 'Manage customer information' use case always requires the included use cases.

Option D has the extend relationships backward, which is not aligned with the scenario described.

Therefore, the correct answer is:

B . Option B


Question 7

Choose the correct answer:

Which diagram is invalid?

A)

B)

C)

D)



Answer : C

Option C shows a UML diagram where a class (One) appears to have an aggregation relationship with itself. In UML, an aggregation is a special type of association that represents a whole-part relationship between the aggregate (whole) and a component part. However, it does not make sense for a class to aggregate itself; such a relationship implies that instances of the same class are parts of each other, which is conceptually invalid.

Let's consider the other options: A) This diagram shows a class contained within another, which is a valid use of nesting classes. B) This diagram shows a composition relationship, which is a form of aggregation with a stronger lifecycle dependency between the whole and the part. This is a valid relationship in UML. D) This diagram shows a class containing two nested classes, one of which contains another nested class. This is also a valid representation of nested classes in UML.

Therefore, the correct answer is:

C . Option C


Page:    1 / 14   
Total 90 questions