Consider the following interaction diagram.  Which number pair represents the start and end of an execution specification?
-
A
-
B
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answerD
ExplanationIn UML sequence diagrams, an execution specification is represented by a thin rectangle along a lifeline. It shows where in time the execution takes place, starting with the initiation of an operation or process and ending when that process is complete. In the interaction diagram provided, we can see an execution specification on the lifeline p1: P that starts after the message corresponding to point 3 is received and ends just before the message corresponding to point 5 is sent. This means the execution specification is bracketed by points 3 and 5. Points 1 and 2 represent message sends, 1 and 4 could represent a message send and receive for the same message, which doesn't typically represent the full execution specification. Points 2 and 3 don't represent a logical start and end of an execution specification because they're on different lifelines. Therefore, the correct answer is: D. 3, 5
Consider the following diagram fragment:  What makes this fragment invalid?
-
A
A list of elements is not allowed in a package body.
-
B
classone is missing a visibility.
-
C
An *interface is not allowed in a package
-
D
Private elements are not allowed on the list.
-
E
Protected elements are not allowed in a package.
-
F
Element six is missing its stereotype.
Reveal answer details
Close answer details
Correct answerF
ExplanationIn the given UML package diagram fragment, various elements are listed with stereotypes indicating their nature (class, interface). Stereotypes are used in UML to extend the vocabulary of UML in order to create new kinds of building blocks. They are typically enclosed in guillemets ( ). The last element, 'six', does not have a stereotype indicating whether it's a class, interface, or some other kind of element. This lack of a stereotype leads to ambiguity about the nature of 'six'. Therefore, the fragment is considered invalid due to this omission. All the other options do not constitute an error in the UML fragment: A) A list of elements is allowed in a package body. B) Visibility is not required for every element, especially within package diagrams. C) Interfaces are allowed in packages. D) Private elements are allowed in a package. E) Protected elements are also allowed in a package. Therefore, the correct answer is: F. Element six is missing its stereotype.
Which scenario would be modeled most appropriately in a state machine?
-
A
the use of buttons to control a digital watch
-
B
the exchange of messages in a client-server system
-
C
the data flows and processes in an office automation system
-
D
the nature of the transitions from ice to water to steam in a physical system
-
E
the overview ofbehavior and message exchange in a distributed medical insurance system
Reveal answer details
Close answer details
Correct answerD
ExplanationState machines are ideal for modeling systems or objects that exhibit distinct states and transitions between them based on events or conditions. Let's analyze why option D is the best fit and why others are less suitable: D - Transitions in a Physical System:The transitions between different states of matter (ice, water, steam) are governed by well-defined conditions (changes in temperature and pressure). State machines can effectively represent these states and the rules governing the changes between them. Other Options: A - Control of a Digital Watch: While a state machine could model some aspects of a watch (e.g. time display mode, set mode), interactions with buttons are better represented by event-driven models or user interface flow diagrams. B - Client-Server Messaging: Sequence diagrams or communication diagrams are more suitable for modeling message exchanges, as they focus on the interaction between different components. C - Office Automation Workflows: Business process modeling notations (BPMN) or data flow diagrams would be more appropriate for capturing the processes and data movements in an office system. E - Distributed Medical Insurance System: A combination of sequence diagrams (for message exchanges), activity diagrams (for processes), and state machines (for behavior within individual system components) would likely be needed to model a complex system like this. References: UML Specification (Superstructure) Version 2.5.1: The section on state machines is a primary reference for their capabilities (https://www.omg.org/spec/UML/2.5.1) . Modeling Guides: Various resources on UML modeling techniques often provide insights into when different diagram types are most appropriate.
Exactly two Player Instances are involved in the "Play Tennis" Use Case. Which diagram depicts this scenario correctly? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationIn UML use case diagrams, when specifying the number of actors involved in a use case, a multiplicity marker can be used. The multiplicity marker is a number placed near the actor symbol that denotes how many instances of the actor are involved in the use case. Option C correctly uses a multiplicity marker of '2' next to the actor 'Player', which indicates that exactly two instances of 'Player' are involved in the "Play Tennis" use case. Here is a brief explanation of why the other options are incorrect: A) Option A shows two separate 'Player' actors involved in "Play Tennis" without a multiplicity marker, implying possibly different kinds of players, but does not specify that exactly two instances are required. B) Option B shows two 'Player' actors involved in "Play Tennis" without a multiplicity marker, also not specifying the exact number of instances required. D) Option D uses a multiplicity marker, but it is incorrectly placed near the 'Play Tennis' use case instead of the 'Player' actor, which does not follow UML notation for indicating actor multiplicity.
In a sequence diagram, what does a Lifeline represent?
-
A
The implementation code of an operation
-
B
A participant in an Interaction over time
-
C
A package that contains messages
-
D
A guard condition on an Activity edge
Reveal answer details
Close answer details
Correct answerB
ExplanationA Lifeline in a sequence diagram represents a participant in an Interaction as that participant exists over time. It shows how messages are sent to and from that participant during the interaction. It is not implementation code, not a package, and not a guard on an Activity edge. The Lifeline is a core concept for modeling message exchange behavior in sequence diagrams.
What is the meaning of the relationship shown in the diagram below? 
-
A
class B is the creator of class A
-
B
class A is dependent on class B
-
C
class B is dependent on class A
-
D
class A can be reached (torn class B
Reveal answer details
Close answer details
Correct answerB
ExplanationIn UML 2, the dashed arrow with an open arrowhead represents a dependency relationship. In the context of class diagrams, a dependency relationship indicates that changes to one class (the independent class) may cause changes in the other class (the dependent class). The direction of the arrow specifies which class is dependent on which. In the given diagram, the arrow points from class A to class B, which means that class A is dependent on class B. This could manifest as class A using some services or functions of class B, for example. References: UML 2.5 Specification Document: The official document by the Object Management Group (OMG), which defines the syntax and semantics of UML. UML Distilled: A Brief Guide to the Standard Object Modeling Language, Third Edition by Martin Fowler: This book provides a clear guide to UML and includes examples of dependency relationships.
OpaqueExpression can use which languages?
-
A
-
B
only programming languages
-
C
only Mathematical Expressions
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationAn OpaqueExpression in UML 2 is used to specify behavior in a textual form when it is not necessary to specify which language is used, or when it is not possible to use graphical notation. According to the UML 2 specification, an OpaqueExpression is not limited to any particular language; it can represent expressions written in any language. The key characteristics of an OpaqueExpression are as follows: The 'body' of an OpaqueExpression is a sequence of strings, where each string could be written in a different language. This means it has the capacity to include multiple languages simultaneously. The 'language' attribute is optional and is used to indicate the languages of the respective 'body' parts. The allowance for any language is clearly stated in the UML 2 Infrastructure Specification. OpaqueExpression is designed to be a flexible way to capture expressions that are not readily expressible in UML or when using a language outside the scope of UML (e.g., mathematical expressions, programming languages, or other domain-specific languages).
A class PaymentService realizes an interface named Billable. Which UML relationship is used for this?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationWhen a classifier such as a class provides the contract specified by an interface, UML uses InterfaceRealization. This shows that the class conforms to the operations or receptions defined by the interface. Generalization is used for inheritance between more general and more specific classifiers. Association connects instances of classifiers. PackageMerge applies to packages, not to classes and interfaces. Therefore, the correct relationship is InterfaceRealization.
What is the defining characteristic of a domain model?
-
A
It is a model that is specified using UML diagrams.
-
B
It is a model that focuses on the domain requirements of the system
-
C
It is a model that captures the main domain concepts and their relationships.
-
D
It is a model that represents the domain architecture of the implementation of the system.
Reveal answer details
Close answer details
Correct answerC
ExplanationA domain model's defining characteristic is that it captures the main domain concepts and their relationships. This model focuses on representing the key elements within the problem domain, outlining how these elements interact with each other without detailing the specific implementations. The domain model is an essential tool in software development for understanding and communicating the fundamental structure of the system from a problem domain perspective, helping teams to design solutions that are well-aligned with actual domain needs. UML is often used to represent domain models due to its capability to visually and clearly model complex relationships and structures.
Question 10
Single choice
Which UML element represents the sending or receiving endpoint of a Message in an Interaction?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationA Message in an Interaction has ends, and those endpoints are modeled as MessageEnds. They identify where the message send and receive occurrences happen in the interaction. A Property is a structural feature, a Trigger is used mainly in state-machine transitions, and a Reception specifies that a classifier can react to a signal. For the endpoint of a message in an interaction, the correct element is MessageEnd.
Question 11
Single choice
A structured class called System has two parts called Subsystem 1 and Subsystem2 respectively, as shown in the class diagram fragment below:  Which of the following diagrams contains an equivalent definition of System? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationIn UML 2, a structured class can have internal parts, which are depicted using 'parts' or 'roles' within the class diagram. These internal parts are used to show the composition of the class in terms of contained classes or components. In the context of the question, the structured class named 'System' contains two parts named 'Subsystem1' and 'Subsystem2'. Option C is the equivalent definition of 'System' in terms of UML 2 notation for several reasons: It represents the structured class 'System' with internal parts correctly labeled as 's1:Subsystem1' and 's2:Subsystem2-[ ]', which indicates the role names 's1' and 's2' followed by the class type 'Subsystem1' and 'Subsystem2' respectively. The notation '1..*' after 's2:Subsystem2-[ ]' suggests a multiplicity, meaning that there can be one or many instances of 'Subsystem2' associated with 'System'. The compartmentalization within the structured class is indicative of the composition of the 'System', showing that 'Subsystem1' and 'Subsystem2' are integral parts of the 'System'. The notation conforms to the standard UML 2 representation for composite structures, as described in the UML 2 Superstructure Specification, where a class can be broken down into its constituent parts within the class rectangle. This information is verified against the UML 2 Superstructure Specification, which is the authoritative source for UML notation and semantics. Particularly, this aligns with section 9.3.5 on Composite Structures Diagrams, which details the graphical notation for parts and roles within a structured class.
Question 12
Single choice
The Sensor Controller state machine shown below is at rest in the Ready state. The acquireData event occurs.  What Is the complete sequence of behaviors that executes before the state machine comes to rest in the Acquiring Data state?
-
A
-
B
-
C
-
D
logStatus. deploy. scanTarget
-
E
logStatus. deploy. scanTarget. logStatus
Reveal answer details
Close answer details
Correct answerD
ExplanationThe provided image depicts a block diagram of a sensor controller represented as a state machine. The state machine transitions between the following states: Initializing Calibrating Ready Acquiring Data The question specifies the state machine starts in the Ready state and theacquireDataevent triggers the transition. Analyzing the image, we can identify the following behaviors for the scenario: logStatus: This behavior is depicted in the diagram as the first action upon exiting the Ready state. It most likely logs the current state of the sensor controller. deploy: The transition from Ready to Acquiring Data triggers the deploy behavior. This likely involves preparing the sensor for data acquisition. scanTarget: Upon entering the Acquiring Data state, the scanTarget behavior is initiated. This suggests the sensor controller is actively collecting data from the target. Therefore, the complete sequence of behaviors islogStatus, followed bydeploy, and lastlyscanTarget, before reaching the Acquiring Data state. Justification for excluding other options: Option A (deploy only) excludes the initial state logging and target scanning actions. Option B (logStatus.deploy) excludes the target scanning upon entering the Acquiring Data state. Option C (deploy, scanTarget) omits the initial state logging. Option E (logStatus.deploy.scanTarget.logStatus) includes an extra logStatus action after target scanning, which is not supported by the diagram. In conclusion, based on the state machine diagram and the behavior descriptions, option D (logStatus.deploy.scanTarget) accurately reflects the sequence of actions that occur before the sensor controller arrives at the Acquiring Data state.
Question 13
Single choice
Consider the following diagram:  According to the diagram, which statement describes the property db?
-
A
The property db is a primary key
-
B
The property db is a static property.
-
C
The property db is inherited from a superclass.
-
D
The property db is important and is emphasized by the modeler with an underline.
Reveal answer details
Close answer details
Correct answerB
ExplanationIn UML, a static property is one that belongs to the class itself rather than any instance of the class. In UML diagrams, static properties are denoted by underlining the property name. Now, let's review the options: A. There is no UML notation in the diagram that specifies whether the property db is a primary key. Primary keys are a database concept and UML does not have a standard way to denote them. B. The property db is underlined, which indicates that it is a static property. This is the correct UML notation for depicting a class-level attribute. C. There is no indication in the diagram that db is inherited from a superclass. Inherited properties typically are not underlined (unless they are also static), and there is no superclass shown in the diagram. D. Underlining in UML does not signify importance or emphasis by the modeler, it indicates that a property is static. Therefore, the answer is B: The property db is a static property. This is based on standard UML notation as outlined in the UML 2.5 Specification by the Object Management Group (OMG), which dictates that static members (attributes or operations) are underlined in class diagrams.
Question 14
Single choice
Which object has the highest value that is properly assigned to a salary slot? 
-
A
-
B
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answerD
ExplanationIn UML, when specifying the value of an attribute in an instance specification (which is what each of these boxes represents), the notation used is generally: attributeName: Type = Value Looking at each option provided, we see that they are different representations of numerical values for an attribute named salary of type Real. Here's how to interpret each representation: A) -salary: Real = "$10,000.00" - This uses a string representation of the number, which is generally not how numerical values are assigned in UML, especially with the explicit type Real. B) -salary: Real = $20,000.00 - This is more typical for showing a real number in UML, though the dollar sign is not part of the actual numerical value and should not be included. C) -salary: Real = 30000.00 - This is a correct numeric representation of a real number without unnecessary symbols. D) -salary: Real = 40,000.00 - This is also a correct representation and indeed has the highest numeric value among the options provided. E) -salary: Real = 500 E 02 - This is scientific notation, which is also a valid representation of real numbers in UML. The value represented here is 500 * 10^2, which equals 50,000.00. After examining each option, the correct answer is D. Option D, because the instance four:Employee has the highest value properly assigned to a salary slot according to the standard UML notation. However, there's a point to be clarified: while UML does not specify formatting of numbers with commas for thousands or currency symbols, it does accept scientific notation. So, if we were strictly interpreting the values as real numbers, Option E would represent the highest numerical value. But considering proper UML formatting and assuming the intent is to use standard decimal notation without currency symbols or commas, Option D is the best answer.
Question 15
Single choice
Consider the following diagram:  Which statement is true about the diagram?
-
A
Within G you may refer to v:K by gh.H::v. .
-
B
From within H it is impossible to reach the v within G.
-
C
The package Pckg cannot have two definitions of v as shown in the diagram.
-
D
v will indicate different elements depending on where you refer to v within Pckg
Reveal answer details
Close answer details
Correct answerD
ExplanationThe diagram you provided shows two classes, G and H, which are within a package named Pckg. Each class has an attribute named 'v' with different visibility and typeindicators. The attribute 'v' in class G has visibility 'private' (denoted by '-'), and in class H, it is 'protected' (denoted by '#'). This suggests that the scope of each 'v' is limited to its respective class. Therefore, when you refer to 'v' within the package, its meaning depends on the context or the namespace from which it's accessed. References: UML 2.x Superstructure Specification: This defines the rules for scopes and namespaces in UML. It clarifies how elements with the same name can coexist in different namespaces and how their references would differ based on the context. UML 2.x Infrastructure Specification: Provides the foundational concepts for UML, including the semantics of structured classifiers and namespaces which pertain to the interpretation of the 'v' attribute in different classes.
Question 16
Single choice
What is an advantage of modeling as a part of the software analysis and design process?
-
A
It reduces the risk of inconsistent or improper implementations.
-
B
It reduces the risk of incorporating technology constraints into a design.
-
C
It reduces the risk of using an incorrect or improper programming language.
-
D
It reduces the risk of the solution being strongly related to business practices.
Reveal answer details
Close answer details
Correct answerA
ExplanationModeling as part of the software analysis and design process offers several advantages, one of the primary being the reduction in the risk of inconsistent or improper implementations. By using models, developers can visualize the structure and behavior of the system before actual coding begins, allowing for the identification and correction of potential issues in the early stages of development. This practice helps ensure that all components of the software work together as intended, reducing the likelihood of bugs and inconsistencies that could arise if parts of the system were developed in isolation. UML, as a standardized modeling language, provides a coherent and universally understood set of diagrams and symbols, which facilitates clear communication among team members and stakeholders, further mitigating the risk of misunderstandings that could lead to improper implementations.
Question 17
Single choice
How many execution occurrence specifications are there in total on the diagram below? 
-
A
-
B
-
C
-
D
-
E
-
F
-
G
Reveal answer details
Close answer details
Correct answerD
ExplanationAn execution occurrence specification in UML sequence diagrams is represented by a thin rectangle on a lifeline. It shows that an instance is performing an action over a period of time. In the provided sequence diagram, we can see three such thin rectangles on lifeline 'b', which indicates that there are three execution occurrence specifications. One for the message that comes from 'a' to 'b'. Another one for the message that 'b' sends to 'c'. And the last one for the return message from 'c' to 'b'. There are no execution occurrence specifications on lifelines 'a' and 'c'.
|