Free OMG-OCUP2-FOUND100 Exam Braindumps
OMG Certified UML Professional 2 (OCUP 2) - Foundation Level Questions 16–20 (page: 5)

Updated On: 9-Feb-2026

Choose the correct answer :

In the context of a UML model designed to capture the elements of a real-world business enterprise, the class Employee appears in the fragment of a class diagram as shown below:



Which actual entity does this element represent?

  1. An employee of the company
  2. The set of all employees of the company
  3. An anonymous employee of the company
  4. A diagram of an employee of the company

Answer(s): B

Explanation:

In the context of a UML (Unified Modeling Language) model, the class named 'Employee' represents a template for all entities that are classified as employees within the business enterprise model.
Therefore, the correct answer is:

B . The set of all employees of the company

The term 'Employee' in the class diagram is a UML Class, which is defined as a description of a set of objects that share the same attributes, operations, relationships, and semantics (UML 2.5 specification, section 9.2). A class in UML is a blueprint from which individual objects (instances of the class) are created. It is not a representation of any single employee, an anonymous employee, or a diagram of an employee, but rather the conceptual model that defines the properties and behaviors of all employee instances in the domain being modeled.



Choose the correct answer :

In UML modeling, what is a Constraint?

  1. a condition that must be satisfied when it is evaluated
  2. a condition that should be met depending on system operation
  3. a condition that causes the state of the objects to change over time
  4. a condition that constrains what can or cannot be put in a class diagram

Answer(s): A

Explanation:

In UML modeling, a constraint is defined as:

A . a condition that must be satisfied when it is evaluated

A constraint is a semantic condition or restriction expressed in natural language text or a machine- readable language for expressing constraints, such as OCL (Object Constraint Language). Constraints specify invariants that must hold for the system being modeled at all times. This means that whenever the constraint is evaluated, the condition it expresses must be satisfied (UML 2.5 specification, section 7.9).

The other options do not accurately define what a constraint is in the context of UML:

B . A condition that should be met depending on system operation ­ This is not precise as constraints are not optional and do not depend on system operation; they are always applicable.

C . A condition that causes the state of the objects to change over time ­ This describes a side effect, which is not the purpose of a constraint. A constraint is a condition that must always be met, not something that induces change.

D . A condition that constrains what can or cannot be put in a class diagram ­ This is too broad and imprecise. Constraints apply to elements within the class diagram and are not about the content of the diagram itself.



Choose the correct answer :

Suppose you are using a programming language that knows the following basic types: byte, short, and long.

Which diagram defines them:

A)



B)



C)



D)

  1. Option A
  2. Option B
  3. Option C
  4. Option D

Answer(s): A

Explanation:

In UML, basic types like byte, short, and long are represented as DataType elements. These are typically used to specify the types of attributes, parameters, or return values of operations in a model. Option A shows three separate classes named Byte, Short, and Long, which would represent these as distinct data types within the UML model.

Option B incorrectly uses stereotypes on objects, which is not the correct UML representation for data types. Option C shows a class with attributes of different types, but it does not define these types as basic types. Option D is incorrect because it uses stereotypes on DataType elements, which is not the standard way to represent basic types in UML.

According to the UML 2.5 specification, DataTypes are a kind of classifier that specifies a domain of values without identity (section 10.5.8). DataTypes are not classes; they do not have operations and cannot have instances that maintain an identity.



Choose the correct answer :

Consider the following model



Where is v visible?

  1. Only inside S
  2. Only inside T
  3. Only inside S and T
  4. Inside the whole P

Answer(s): C

Explanation:

In UML, visibility of an attribute is determined by the scope of the classifier it belongs to and its visibility markers. The attribute 'v' is marked with a '-' sign, indicating it is private. Being private, it would normally be visible only within the class it is defined in, which is 'S' in this case. However, since 'T' is a subclass of 'S' (as indicated by the generalization relationship, a line with a closed, unfilled arrowhead), it inherits the attribute 'v'. Therefore, 'v' is visible in both 'S' and 'T'.

Option A is incorrect because it does not consider inheritance. Option B is incorrect for the same reason. Option D is incorrect because a private attribute in a class is not visible to the entire package, only to the class itself and its subclasses.

The UML 2.5 specification states that a private member is only accessible within the namespace it is defined (section 7.5.3). Since 'T' is within the namespace of 'S' due to inheritance, 'v' is visible in both.



Choose the correct answer :

What is the key difference between DataTypes and Classes?

  1. Classes can have operations that show that a class reacts to invocations sent by other classes DataTypes do not have this feature.
  2. DataTypes can only be very simple structures with attributes that are Datatypes as well, whereas Classes can be of arbitrary complexity.
  3. Two instances of a Datatype are considered to be equal when all their attributes have the same values, unlike instances of classes.
  4. Classes can inherit attributes, operations and other features of their super classes. DataTypes can only get instantiated.

Answer(s): C

Explanation:

DataTypes in UML are a type of classifier that represents a set of values that do not have identity, which means that two instances of a DataType are indistinguishable if all their attributes are equal. This is in contrast to instances of Classes, which are distinguishable by their identity - each instance is considered unique even if their attributes have the same values.

Option A is incorrect because DataTypes can indeed have operations in UML. Option B is also incorrect; DataTypes can have attributes of any complexity. Option D is incorrect because DataTypes can also have features inherited from their super DataTypes; it is not solely about instantiation.

The UML 2.5 specification discusses DataTypes in section 10.5.8, stating that DataTypes do not have an identity and are often used to type attributes and operation parameters. The equality of DataType instances is based on the equality of their attribute values. Classes, however, are described in section 9.2 of the UML 2.5 specification as elements that can have identity, and instances of a Class are distinguished based on that identity.



Viewing page 5 of 19
Viewing questions 21 - 25 out of 90 questions


Post your Comments and Discuss OMG OMG-OCUP2-FOUND100 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!