OCUP 2 Foundation study materials
OCUP 2 Foundation study resources

OCUP 2 Foundation practice questions

One question at a time. Build your OCUP 2 Foundation understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1UML behavioral diagram types

In UML, which behavioral diagram is primarily intended to show the chronological ordering of messages exchanged between objects over time?

  1. Activity diagram
  2. Sequence diagram Correct answer.
  3. Communication diagram
  4. State machine diagram

Explanation

A sequence diagram uses lifelines and vertically stacked messages so that the time ordering of interactions is read top to bottom. Communication diagrams convey similar interactions but emphasize structural links and number their messages instead of using a time axis.

Question 2UML behavioral diagram types

Which UML behavioral diagram is best suited to describe the states an object passes through during its lifetime and the events that trigger transitions between them?

  1. Sequence diagram
  2. State machine diagram Correct answer.
  3. Timing diagram
  4. Use case diagram

Explanation

State machine diagrams focus on a single classifier's states, the events that cause transitions, and guards or effects attached to those transitions. They are the standard choice for lifecycle and event-driven behavior of one object.

Question 3UML behavioral diagram types

A modeling team needs to depict the order in which business tasks and decisions flow, including parallel branches and merges. Which behavioral diagram type fits this need?

  1. Activity diagram Correct answer.
  2. Class diagram
  3. Composite structure diagram
  4. Object diagram

Explanation

Activity diagrams model workflows with actions, decisions, forks, and joins, which makes them suitable for business process and algorithmic flow. The other listed diagrams are structural and do not express control flow.

Question 4UML behavioral diagram types

Which element in a use case diagram represents a role played by a person or external system interacting with the subject?

  1. Actor Correct answer.
  2. Node
  3. Port
  4. Include

Explanation

An actor models an external role that interacts with the system's use cases, drawn outside the subject boundary. Include, node, and port belong to other UML concepts and do not denote an interacting role.

Question 5UML behavioral diagram types

In a sequence diagram, what does a lifeline represent?

  1. A combined fragment that groups messages
  2. A single message sent between two objects
  3. A guard condition controlling when a message may be sent
  4. An individual participant in the interaction and its existence over time Correct answer.

Explanation

A lifeline denotes one interacting instance, with a dashed line showing existence and an activation bar showing when it is executing behavior. Messages, guards, and fragments are separate notation placed around lifelines.

Question 6UML behavioral diagram types

Which UML behavioral diagram places primary emphasis on the timing of state or value changes along a horizontal time axis?

  1. Communication diagram
  2. Interaction overview diagram
  3. Timing diagram Correct answer.
  4. Use case diagram

Explanation

Timing diagrams are an interaction diagram variant that shows state or value changes of lifelines against a time axis, including duration constraints. Other interaction diagrams emphasize message ordering or structural links rather than a time-scaled axis.

Question 7UML behavioral diagram types

Which statement correctly describes the relationship between use case diagrams and the behaviors they summarize?

  1. A use case diagram replaces activity diagrams for modeling decision logic inside a use case.
  2. A use case diagram must show every message exchanged between internal objects.
  3. A use case diagram specifies the internal algorithm executed by each use case.
  4. A use case diagram shows actors, use cases, and their associations to define system scope and externally visible functionality. Correct answer.

Explanation

Use case diagrams give a black-box view of system functionality: actors, use cases, subject boundary, and relationships such as include and extend. Internal algorithms and message exchanges are detailed in other behavioral diagrams, such as activity or sequence diagrams.

Question 8UML behavioral diagram types

In an activity diagram, which node is used to split the flow into multiple concurrent paths?

  1. Merge node
  2. Final node
  3. Decision node
  4. Fork node Correct answer.

Explanation

A fork node has one incoming flow and multiple outgoing flows, representing concurrent paths that later synchronize at a join. Decision nodes choose one alternative, and merge nodes combine alternatives without concurrency.

Question 9UML behavioral diagram types

A sequence diagram contains a combined fragment labeled alt with two operands. What does this notation communicate?

  1. The messages in the fragment are optional and are always executed once.
  2. The fragment indicates that all operands execute concurrently.
  3. The messages in the fragment are executed repeatedly until a guard becomes false.
  4. The fragment represents alternative message sequences, with a guard selecting which operand is executed. Correct answer.

Explanation

The alt operator denotes choice between alternatives, and each operand carries a guard that determines when that branch applies. Loop, opt, and par operators express repetition, optionality, and concurrency respectively.

Question 10UML behavioral diagram types

In a state machine, a transition is labeled with the text 'submit [valid] / save'. Which interpretation is correct?

  1. The event submit is sent only after save completes and valid becomes true.
  2. The guard valid is evaluated after the effect save executes.
  3. The transition fires whenever valid is true regardless of the triggering event.
  4. The event submit triggers the transition only when valid is true, and save is executed as the transition effect. Correct answer.

Explanation

The transition syntax is event [guard] / effect, so submit is the trigger, valid is the guard that must evaluate true, and save is the behavior executed when the transition fires. Guards are evaluated before the effect is executed.

Question 11UML behavioral diagram types

In a communication diagram, the message label '2b: confirm()' on a link indicates what?

  1. The second message of the interaction, nested as sub-message b, is confirm(). Correct answer.
  2. The message confirm() is sent exactly twice.
  3. The link carries a message sent from the receiver to itself only.
  4. Message number 2b is a guard condition for the interaction.

Explanation

Communication diagrams use nested decimal numbering to express ordering, so 2b is a sub-message of message 2. The label names the message and its position in the sequence rather than a repetition count.

Question 12UML behavioral diagram types

An activity diagram shows a decision node with three outgoing edges, but only two edges have guards and no edge has an else guard. What modeling issue does this raise?

  1. A token may be unable to leave the decision node when no guard is true, so coverage should be completed with a guard such as else. Correct answer.
  2. The unguarded edge will always be taken first, so guards are optional.
  3. The decision node is invalid because decisions must have exactly two outgoing edges.
  4. The decision node must be replaced by a fork node to allow three paths.

Explanation

Guards on a decision node should be mutually exclusive and, in practice, collectively cover the alternatives so a token is not stranded. Adding an else guard ensures a path is available when the other guards are false.

Question 13UML behavioral diagram types

Which interaction diagram is defined as an activity-like composition of interactions, allowing control nodes between references to other interactions?

  1. Sequence diagram
  2. Timing diagram
  3. Communication diagram
  4. Interaction overview diagram Correct answer.

Explanation

An interaction overview diagram uses activity diagram notation to orchestrate flows among interaction references, which helps present large interaction models at a high level. Sequencing, timing, and structural links are the focus of the other options.

Question 14UML behavioral diagram types

In a use case diagram, use case A is related to use case B by an include relationship directed from A to B. What does this mean?

  1. A always incorporates the behavior of B as part of its execution. Correct answer.
  2. A and B are alternative specializations of a common parent use case.
  3. B inherits all actors associated with A.
  4. B is an optional variation that may extend A under certain conditions.

Explanation

An include relationship means the including use case always incorporates the included behavior, which is useful for shared mandatory steps. Extend, by contrast, denotes optional or conditional behavior added to a base use case.

Question 15UML behavioral diagram types

A state machine has a composite state containing substates, and a transition leaves the composite state from its boundary. What happens to the active substate?

  1. The substate becomes the target of the transition automatically.
  2. The transition is ignored unless the substate explicitly triggers it.
  3. The substate remains active in parallel with the target state.
  4. The composite state is exited, so its active substate is also exited before the transition's target is entered. Correct answer.

Explanation

Leaving a composite state exits the composite as a whole, which includes exiting whichever substate is currently active. The transition then enters its target state normally.

Question 16UML behavioral diagram types

Which notation in a sequence diagram indicates that a lifeline is executing an operation, shown as a thin rectangle on the lifeline?

  1. Gate
  2. Destruction occurrence
  3. Execution specification Correct answer.
  4. Combined fragment

Explanation

An execution specification, often called an activation bar, shows the period during which a lifeline is performing behavior. Fragments group messages, gates connect fragments to outside messages, and a destruction occurrence marks the end of a lifeline.

Question 17UML behavioral diagram types

A team models an online order process as an activity diagram. They want the flow to wait until both a payment confirmation and a stock reservation have completed before shipping. Which construct should they use?

  1. A fork node with two outgoing flows
  2. A decision node with an else guard
  3. A merge node with two incoming flows
  4. A join node with two incoming flows Correct answer.

Explanation

A join synchronizes concurrent incoming flows and emits a token only when all incoming flows have arrived, matching the requirement to wait for both activities. A fork would start concurrency rather than wait for its completion.

Question 18UML behavioral diagram types

In a timing diagram, what does a duration constraint placed between two state changes on a lifeline express?

  1. The priority of the second state over the first
  2. The probability that the second state is reached
  3. The maximum number of messages allowed during the interval
  4. The permitted time interval between the two occurrences Correct answer.

Explanation

Duration constraints in timing diagrams specify allowed time spans between occurrences, such as a minimum or maximum duration for remaining in a state. They express temporal requirements rather than message counts, priorities, or probabilities.

Question 19UML behavioral diagram types

Which statement best distinguishes an activity diagram from a state machine diagram?

  1. An activity diagram is structural, while a state machine is behavioral.
  2. An activity diagram models object links, while a state machine models class associations.
  3. An activity diagram models control and data flow among actions, while a state machine models states and event-driven transitions of a classifier. Correct answer.
  4. An activity diagram is used only for software, while a state machine is used only for hardware.

Explanation

Both are behavioral diagrams, but activities emphasize the flow of actions and tokens, including concurrency and data flow, whereas state machines emphasize states and the events and guards that cause transitions. They are not restricted to software or hardware respectively.

Question 20UML behavioral diagram types

A use case diagram shows an actor connected to use case A, and use case B has an extend relationship pointing to A. Which statement is accurate?

  1. B may add behavior to A under specified conditions, and the actor need not be associated with B directly. Correct answer.
  2. B must be associated with a different actor than A.
  3. B replaces A whenever the extending condition is true.
  4. B is always executed whenever A is executed.

Explanation

Extend models optional or conditional behavior inserted into the base use case at an extension point, and the extending use case is not necessarily associated with the same actor. Include would express mandatory shared behavior instead.

Question 21UML behavioral diagram types

In a sequence diagram, a message is drawn from lifeline X to lifeline Y, and Y's lifeline ends with a large X symbol shortly afterward. What does the X symbol denote?

  1. Y is a composite lifeline
  2. The message was rejected by Y
  3. Y is destroyed at that point in the interaction Correct answer.
  4. Y's execution specification has ended

Explanation

A destruction occurrence, drawn as an X at the end of a lifeline, indicates that the lifeline's object is destroyed at that point. It is distinct from the end of an activation bar, which only marks the end of an execution.

Question 22UML behavioral diagram types

A state machine models a door with states Closed and Open. The event open moves Closed to Open, and close moves Open to Closed. A transition labeled open is also drawn from Open back to Open. What is the effect of that self-transition?

  1. It handles the open event while already Open by executing its effect and remaining in Open, instead of ignoring the event. Correct answer.
  2. It creates a new concurrent region in the Open state.
  3. It makes the Open state a composite state with a substate.
  4. It overrides the transition from Closed to Open.

Explanation

A self-transition is an external transition whose source and target are the same state; when triggered, the state is exited and re-entered and any effect runs. It allows an event to be handled while the object is already in that state.

Question 23UML behavioral diagram types

A sequence diagram uses a par combined fragment containing two operands, each with a message to the same lifeline. What must the modeler consider about the receiving lifeline?

  1. Only the first operand is executed and the second is ignored.
  2. The two messages are guaranteed to arrive in the order of the operands.
  3. The operands execute only if a shared guard is true for both.
  4. The interleaving of the operands is not fixed, so the receiving lifeline must tolerate either order or the model needs additional constraints. Correct answer.

Explanation

The par operator denotes concurrent execution of its operands, and UML does not prescribe a fixed interleaving among them. If order matters, the modeler must add constraints or restructure the interaction.

Question 24UML behavioral diagram types

An activity diagram contains a fork followed later by a join, with an interruptible region around the activities between them. An interrupt occurs while one branch is still running. What is the resulting behavior?

  1. The fork is re-executed to restart the region.
  2. The entire interruptible region is exited, terminating all activity within it, and the interrupt flow is taken. Correct answer.
  3. The interrupt is queued until the join completes and then handled.
  4. Only the branch that received the interrupt stops, and the other branch continues to the join.

Explanation

An interruptible activity region is abandoned as a whole when its interrupting edge is triggered, so all tokens inside the region are terminated and control follows the interrupt edge. This differs from stopping a single branch.

Question 25UML behavioral diagram types

A state machine defines state S with an entry action and an internal transition labeled 'tick / log'. The event tick occurs while S is active. What happens?

  1. The internal transition executes its effect without exiting or re-entering S, so the entry action does not run again. Correct answer.
  2. S is exited and re-entered, so the entry action executes again.
  3. The event tick is deferred until S is exited.
  4. The event tick causes a transition to a submachine state.

Explanation

An internal transition, written inside the state's compartment without a target, handles the event and runs its effect while the state remains active. Because the state is not exited or re-entered, entry actions are not repeated; this distinguishes it from a self-transition.

Question 26UML behavioral diagram types

Which UML behavioral diagram type is primarily intended to show the life history of a single object reacting to events?

  1. Sequence diagram
  2. State machine diagram Correct answer.
  3. Activity diagram
  4. Use case diagram

Explanation

A state machine diagram focuses on one object's states and the events that trigger transitions between them, describing its life history. The other behavioral diagrams describe interactions among several objects or the flow of work rather than a single object's state trajectory.

Question 27UML behavioral diagram types

In a sequence diagram, what does the dashed line descending from a lifeline after a synchronous message indicate?

  1. The reply or return of control to the caller Correct answer.
  2. The message was sent asynchronously
  3. The lifeline is idle and cannot receive messages
  4. The object instance has been destroyed

Explanation

A dashed arrow returning from the receiving lifeline to the caller represents the reply message, i.e., the return of control and possibly a result value. Synchronous calls are drawn with a solid filled arrowhead, and the reply is conventionally dashed.

Question 28UML behavioral diagram types

Which UML behavioral diagram is best suited to show the responsibilities of actors and the services a system offers to them?

  1. Use case diagram Correct answer.
  2. State machine diagram
  3. Timing diagram
  4. Sequence diagram

Explanation

A use case diagram depicts actors, use cases, and their associations, giving a coarse view of what the system offers to its users. It deliberately abstracts away the internal message order and state details covered by interaction and state diagrams.

Question 29UML behavioral diagram types

In an activity diagram, what does a diamond-shaped node with one incoming edge and several guarded outgoing edges represent?

  1. A merge node that synchronizes concurrent flows
  2. A decision node that selects one outgoing path Correct answer.
  3. A fork node that starts concurrent flows
  4. An initial node that begins the activity

Explanation

A decision node evaluates its outgoing guards and passes the token along exactly one edge whose guard is true, optionally designating an else guard. Guards on a decision must be mutually exclusive so that a single path is chosen.

Question 30UML behavioral diagram types

Which kind of UML diagram is a behavior diagram that shows interactions between lifelines but arranges them around a central object rather than by time?

  1. Communication diagram Correct answer.
  2. Activity diagram
  3. Class diagram
  4. Timing diagram

Explanation

A communication diagram is an interaction diagram that emphasizes the structural links between lifelines and numbers its messages to express order. Sequence diagrams convey the same interaction but emphasize chronological ordering along a vertical axis.

Question 31UML behavioral diagram types

In a state machine, what is the meaning of a transition whose trigger is omitted and which leaves a state automatically when its internal activities complete?

  1. A deferred event transition
  2. A self-transition
  3. A completion transition Correct answer.
  4. An internal transition

Explanation

A transition with no explicit trigger is a completion transition; it fires when the source state finishes its do activity or reaches its final state. It is the standard way to chain states without naming an event.

Question 32UML behavioral diagram types

Which element in a use case diagram represents a role played by a human user or an external system interacting with the subject?

  1. An actor Correct answer.
  2. A use case
  3. An extension point
  4. A subject boundary

Explanation

An actor models a role external to the system that interacts with the subject through use cases, and it is drawn as a stick figure. The same physical person may play several actor roles, and one actor may be played by several people.

Question 33UML behavioral diagram types

In a sequence diagram, which notation denotes a lifeline that exists only during a limited portion of the interaction?

  1. A lifeline with no activation bar at any point
  2. A lifeline created by a create message and terminated by a delete message Correct answer.
  3. A lifeline whose name is prefixed with the keyword external
  4. A lifeline drawn with a dashed head instead of a rectangle

Explanation

Objects can be created during an interaction, shown by a create message whose arrowhead points at the lifeline head, and destroyed by a delete message ending in a large cross. Between those points the lifeline is present; before creation and after destruction it is absent.

Question 34UML behavioral diagram types

An activity diagram models a review process. A reviewer may approve or reject, and after either outcome the artifact is archived. Which modeling construct most directly expresses that the archive step runs regardless of which outcome occurred?

  1. An interruptible region around the review step
  2. A join node placed before the archive step
  3. A decision node with an else guard on the archive edge
  4. A merge node placed before the archive step Correct answer.

Explanation

A merge node has several incoming edges and one outgoing edge, so alternative paths converge and continue to a shared successor. A join would instead wait for all incoming tokens, which would be wrong when only one branch produces a token.

Question 35UML behavioral diagram types

A state machine models a media player with a composite state Playing that contains substates Buffering and Streaming. A transition labeled stop leaves Playing and targets Stopped. What is the effect on the substates when stop is received while in Streaming?

  1. The transition fires only after Buffering is re-entered
  2. The composite state is exited, so Streaming is left and Stopped is entered Correct answer.
  3. Streaming remains active while Stopped is also entered
  4. The transition is ignored because the substate must handle it first

Explanation

A transition whose source is the composite state is triggered by events not consumed by the active substate, and taking it exits the composite state, terminating its active substate configuration. The machine then enters the target state Stopped.

Question 36UML behavioral diagram types

In a sequence diagram, a combined fragment labeled loop has the guard [for each item in cart]. What does this fragment specify?

  1. The enclosed messages execute repeatedly while the guard holds Correct answer.
  2. The enclosed messages execute at least once and at most once
  3. The enclosed messages execute only when a prior alt operand fails
  4. The enclosed messages execute in parallel on separate threads

Explanation

The loop operator encloses behavior that is repeated while its guard evaluates true, and the guard may specify a lower and upper bound as well. It does not by itself assert concurrency or exclusivity with other fragments.

Question 37UML behavioral diagram types

A use case diagram shows actor Clerk associated with use case Place Order, and actor Manager associated with both Place Order and Approve Discount. Which statement is consistent with the diagram?

  1. A Manager instance can initiate Place Order and Approve Discount Correct answer.
  2. Manager is a generalization of Clerk in this diagram
  3. Place Order inherits all behavior of Approve Discount
  4. A Clerk instance can initiate Approve Discount as well

Explanation

An association between an actor and a use case means instances of that actor can participate in the use case. Because Manager is associated with both use cases, a manager can initiate either one.

Question 38UML behavioral diagram types

In a timing diagram, two lifelines each show a state changing between values. What does a constraint such as {t..t+3s} attached to a state interval on one lifeline convey?

  1. The priority of that lifeline relative to the other
  2. The maximum number of messages that lifeline may receive
  3. The permitted duration for which that lifeline stays in that state Correct answer.
  4. The number of times the state may be re-entered

Explanation

A duration constraint on a timing diagram bounds how long a lifeline may remain in a given state or hold a given value. It is expressed over the time interval of the state or value occurrence.

Question 39UML behavioral diagram types

A state machine has state Idle with an internal transition labeled ping / count++. The event ping occurs while the machine is in Idle. What happens?

  1. The event is discarded because internal transitions have no effect
  2. Idle is exited and re-entered, running exit and entry actions
  3. The count++ behavior runs and the machine stays in Idle without exit or entry actions Correct answer.
  4. The machine transitions to a final state after the behavior runs

Explanation

An internal transition executes its effect while the state remains active, so no exit or entry actions of that state are performed. This distinguishes it from a self-transition, which does exit and re-enter the state.

Question 40UML behavioral diagram types

In an interaction overview diagram, what does a frame containing the operator ref and the name of another interaction mean?

  1. The referenced interaction occurs at that point in the overall flow Correct answer.
  2. The referenced interaction replaces the enclosing diagram
  3. The referenced interaction is optional and may be skipped
  4. The referenced interaction is inlined and executed twice

Explanation

An interaction overview diagram composes interactions using activity-like control nodes, and a ref frame stands for an occurrence of another interaction at that position. The referenced interaction is defined elsewhere and is not redefined by the frame.

Question 41UML behavioral diagram types

A sequence diagram shows message m1 from A to B, then m2 from B to C, and m2 is drawn with an open arrowhead. What does the open arrowhead on m2 indicate?

  1. m2 is an asynchronous message for which the sender does not wait Correct answer.
  2. m2 is a message that creates a new lifeline C
  3. m2 is a synchronous call that waits for a reply
  4. m2 is a reply returning a value to B

Explanation

An open (unfilled) arrowhead denotes an asynchronous message, meaning the sender continues without waiting for a reply. Synchronous calls use a filled arrowhead and are normally paired with a dashed reply.

Question 42UML behavioral diagram types

An activity diagram contains an object node representing an order between two actions. What does the edge from the first action to the object node and from the object node to the second action express?

  1. A signal send followed by a signal receipt
  2. Object flow that passes the order as output and input Correct answer.
  3. Control flow that merely orders the actions
  4. A dependency between the two actions' classifiers

Explanation

Object nodes hold values produced and consumed by actions, and edges connecting actions through an object node are object flows. This contrasts with control flow edges, which only order execution without carrying data.

Question 43UML behavioral diagram types

In a communication diagram, messages are labeled 1, 1.1, and 1.2 on various links. What does the numbering scheme communicate?

  1. The number of times each message is repeated
  2. The number of arguments each message carries
  3. The priority of each message relative to external events
  4. The nesting and ordering of messages within the interaction Correct answer.

Explanation

Communication diagrams use a decimal numbering scheme in which a message numbered 1.1 is nested inside message 1, conveying sequence without a time axis. This compensates for the lack of vertical ordering found in sequence diagrams.

Question 44UML behavioral diagram types

A use case diagram shows a generalization arrow from use case Express Checkout to use case Checkout. What does this relationship assert?

  1. Express Checkout may optionally extend Checkout at an extension point
  2. Express Checkout is a specialized variant that inherits Checkout's behavior and may add or override steps Correct answer.
  3. Express Checkout and Checkout are performed by the same actor
  4. Express Checkout includes Checkout as a mandatory subpart

Explanation

Generalization between use cases means the child use case specializes the parent, inheriting its behavior and structure while possibly adding or overriding parts. It is distinct from include, which inserts mandatory behavior, and extend, which adds optional behavior.

Question 45UML behavioral diagram types

In a sequence diagram, a combined fragment labeled alt contains two operands, the second guarded by [else]. Which statement is true?

  1. Both operands execute, with the second overriding the first
  2. The else operand executes only after the first operand completes
  3. Exactly one operand executes, and the else operand covers the remaining case Correct answer.
  4. Neither operand executes unless both guards are true

Explanation

The alt operator represents a choice among operands, so exactly one operand whose guard holds is executed. The else guard is a shorthand for the negation of all preceding guards in that fragment.

Question 46UML behavioral diagram types

A state machine must ignore the event pause while in state Running but respond to it after leaving Running. Which modeling element achieves this?

  1. Declaring pause as an entry action of Running
  2. Declaring pause as a guard on a transition out of Running
  3. Declaring pause as an internal transition in Running
  4. Declaring pause as a deferrable trigger in Running Correct answer.

Explanation

A deferrable trigger records the event while the state is active and does not consume it, so the event is retained until a state that handles it becomes active. This differs from an internal transition, which consumes the event and runs a behavior.

Question 47UML behavioral diagram types

An activity diagram places an interruptible region around a long-running computation, with an edge labeled cancel leaving the region's boundary to a Cancelled state. What semantics does this model?

  1. The cancel event is queued until the region's final node is reached
  2. The region executes its actions concurrently with Cancelled
  3. The cancel event terminates the actions inside the region and the flow continues to Cancelled Correct answer.
  4. The computation completes and then cancel is evaluated as a guard

Explanation

An interruptible activity region allows an interrupting edge to abandon the tokens inside the region when its event occurs, after which the flow continues along that edge. Without interruption, the region completes normally through its own outgoing flow.

Question 48UML behavioral diagram types

A state machine contains state S with a do activity that takes time. Event e arrives while the do activity is still executing, and S has no transition triggered by e. Which behavior is consistent with UML semantics?

  1. The event is discarded because the machine is busy, unless it is deferred Correct answer.
  2. The event is queued and always triggers a transition after the do activity completes
  3. The machine exits S immediately and re-enters it to process the event
  4. The do activity is aborted and the event is consumed without effect

Explanation

If no transition in the active configuration is triggered by an event and the event is not deferred, the event is discarded. The do activity continues running and is not aborted by an unhandled event.

Question 49UML behavioral diagram types

A timing diagram shows a lifeline whose state changes from Idle to Busy at time t=5 and back to Idle at t=9, with a duration constraint {4s} on the Busy interval. Which interpretation is correct?

  1. The Busy state must last exactly four seconds, matching the observed interval Correct answer.
  2. The lifeline may send at most four messages while Busy
  3. The transition at t=9 is illegal because duration constraints forbid leaving a state
  4. The Busy state is required to last at most four seconds, and the shown interval violates it

Explanation

A duration constraint specifies the required duration of the interval it annotates, and here the observed Busy interval from t=5 to t=9 satisfies the required four seconds. It constrains elapsed time, not message counts or the legality of exiting the state.

Question 50UML behavioral diagram types

An interaction overview diagram connects two interaction occurrences with a decision node whose outgoing guards are [priority] and [else]. What does the diagram specify about execution?

  1. Both referenced interactions execute, and the guards select which runs first
  2. Exactly one of the referenced interactions is selected according to the guards Correct answer.
  3. The guards are evaluated inside each referenced interaction
  4. The decision node is illegal because control nodes cannot appear between interactions

Explanation

Interaction overview diagrams allow activity-style control nodes between interaction occurrences, so a decision selects exactly one branch according to its guards. The referenced interactions themselves are defined separately and are not modified by the guards.