Choose the correct answer:
How many activities can feed an initial node at the beginning of an activity thread?
Answer : C
The initial node is depicted as a filled circle and is used to show where the control starts within the activity. When the activity is invoked, control tokens are placed on the initial node and can then traverse the outgoing edge to the first action or activity node. The specification clearly states that there should be only one outgoing edge, ensuring that the flow of control is unambiguous at the start of the activity.
It's important to note that while multiple initial nodes can exist within a single activity diagram, each initial node can only be the source of one outgoing edge, and thus, only one activity can feed each initial node.
Choose the correct answer:
What is the name of the property represented by the leftmost lifeline in the following diagram?
Answer : A
In a UML sequence diagram, a lifeline is identified by a box at the top of a dashed line that represents the presence of an individual participant in an interaction. The box contains the name of the lifeline, and optionally, it can include the object name and its classifier type.
In the diagram provided, the leftmost lifeline is labeled v[1]:B, which denotes an instance named v[1] of the classifier B. The name of the property that the lifeline represents is v[1], as B is the type of the object that the lifeline represents, and m represents a message, not a lifeline.
Therefore, the correct answer is:
A . v[1]
Choose the correct answer:
Consider the following diagram:
How many event occurrences are specified in InteractionP?
Answer : C
An event occurrence in a UML Sequence Diagram refers to specific points in time where messages are sent or received. Each message send and each message receipt is counted as one event occurrence.
In the provided diagram for InteractionP, we have the following event occurrences:
The send event of m1().
The receive event of m1() by :Two.
The send event of m2().
The receive event of m2() by :One.
Counting these, we see that there are a total of 4 event occurrences specified in InteractionP.
Therefore, the correct answer is:
C . 4
Choose the correct answer:
Consider the following diagram:
Which diagram presents a view of interactionA that is consistent with the one shown above?
A)
B)
C)
D)
Answer : D
Choose the correct answer:
Consider the following diagram;
What is the minimum number of occurrences that must happen before the reception of m(200)?
Answer : B
The diagram shown is a UML Sequence Diagram, which is used to depict the interaction and order of messages between objects.
In the given diagram, we can see two occurrences of the message 'm' with different parameters (100 and 200), and one occurrence of the message 'p' with the parameter 'run'.
To determine the minimum number of occurrences that must happen before the reception of 'm(200)', we look at the order of messages:
The message 'm(100)' must occur.
The message 'p('run')' must occur after 'm(100)' and before 'm(200)'.
These two occurrences are the minimum necessary before 'm(200)' can be received by the object. The dashed line represents a return message, which does not count as an occurrence for this purpose.
Therefore, the correct answer is:
B . 2
Choose the correct answer:
How many class instances can be shown on an Object Diagram?
Answer : D
In UML, an Object Diagram is a type of static structure diagram that shows a snapshot of the detailed state of a system at a point in time. It focuses on some particular set of objects and attributes, and the links between them. When it comes to the number of instances that can be represented in an Object Diagram, it can range from zero (in cases where the diagram is used to show that no instances of a class exist under certain conditions) to many instances. Therefore, an Object Diagram can show 0 instances, 1 instance, or many instances, which is represented by the multiplicity notation 0..*.
Therefore, the correct answer is:
D . 0..*
Choose the correct answer:
Consider the following diagram fragment:
Which slot's value is hidden outside of the current Employee9
Answer : C
The diagram fragment shows an instance specification for an Employee. The different prefixes before each attribute indicate the visibility of that attribute:
+ Public: Visible to everyone.
- Private: Visible only within the defining class.
# Protected: Visible to subclasses and package.
~ Package: Visible to all classes within the same package.
Given these visibility indicators, the attribute with the private visibility is -salary: Real. This means that the salary attribute is the one that is hidden outside of the current:Employee classifier and cannot be accessed by entities that do not belong to the Employee class.
Therefore, the correct answer is:
C . salary