Black Friday week: every question bank $9 instead of $15. Ends Monday, Nov 30.
Home › OCUP 2 Advanced › Practice questions › The MOF & Metamodeling
OCUP 2 Advanced · OMG · The MOF & Metamodeling · Bank updated 2026-11-28

OMG OCUP 2 Advanced (UML 2 Advanced) practice questions: The MOF & Metamodeling

5 free questions from 12 on this area · answer and explanation for each · no sign-up

These 5 questions come from the The MOF & Metamodeling section of ExamDeck's OMG OCUP 2 Advanced (UML 2 Advanced) bank: 12 of its 172 original questions are on this area, which carries 12% of the real exam. Each is open without sign-up, with the correct answer, the reasoning for every option and its source. In all, 65 OMG OCUP 2 Advanced (UML 2 Advanced) questions are open on the practice pages; a free account adds 6 more in study mode.

Questions on this page last changed 28 Nov 2026. Exam facts checked 8 Nov 2026.

Try 6 free OCUP 2 Advanced questions → All OCUP 2 Advanced sample questions

Free: 6 questions in study mode, no card. All 12 The MOF & Metamodeling questions and the full OCUP 2 Advanced bank: $9 (regularly $15) one-time.

How this bank fits the current exam. The bank has questions in all eleven of OMG's areas, but not yet in the exam's proportions: Common Structure (21% of the exam), The MOF & Metamodeling (12%) and Interactions (9%) are covered more thinly than their weight. Our questions come only from the open OMG specifications - UML 2.5.1, MOF 2.5.1, fUML 1.5 and Alf 1.1 - not from the books on the info sheet's study list. The full exam blueprint → Source: OMG UML 2 Advanced exam info sheet
1/5 · The MOF & Metamodeling
A client asks a Factory to instantiate a metaclass declared with abstract = true. The metaclass is a member of the package the Factory serves, and the reflective create operation is used. What is the outcome?
A. the factory throws an IllegalArgumentException
B. the factory returns null instead of an element
C. the factory returns an element with its properties unset
D. the factory throws a NullPointerException
Answer: B. Factory.create returns null if creation cannot be performed, and classes with abstract = true always give null. IllegalArgumentException is for classes outside the factory's package, and NullPointerException for a null class argument.
  • A. That exception is reserved for a class that is not a member of the factory's package. Here the class is a member (MOF 9.3).
  • B. Correct. create returns null when creation cannot be performed, and abstract classes always yield null (MOF 9.3).
  • C. Unset properties describe what a successful creation of a concrete class yields, not an abstract class (MOF 9.3).
  • D. That exception applies when the class argument itself is null, which is not the case here (MOF 9.3).
Source: OMG Meta Object Facility (MOF) Core Specification 2.5.1 (formal/2019-10-01), 9.3 · MOF Reflection / 9.3 Factory / create on abstract classes
2/5 · The MOF & Metamodeling
A team builds a repository with three levels: system table, table and row. They want one reflective mechanism to move from a row to its table and on to the system table. A colleague insists that MOF requires a fixed four-layer architecture. Which statement about MOF 2 reflection is correct?
A. traverses any number of metalayers, with two as the minimum
B. works only when exactly four metalayers are defined in the repository
C. stops at the direct classifier of the instance it starts from
D. supports at most three metalayers in a single reflective system
Answer: A. MOF 2 treats the layer count as open. Section 7.3 explains that the key concepts are classifier and instance and the ability to navigate from an instance to its metaobject, so the mechanism handles any number of layers from two upward. The four-layer picture is only an example, and the relational system with three levels fits as well.
  • A. Section 7.3 says the Reflection interfaces traverse any number of metalayers recursively, and that two is the minimum so a class and its instances can be navigated.
  • B. Four layers is a common example (MOF, UML, user model, user object), but 7.3 calls the fixed four-layer view a perceived rigidity, not a requirement.
  • C. Reflection allows navigating from an instance to its metaobject and onward recursively, so it does not stop after one step.
  • D. Three layers is the relational example in 7.3, which is only one of several example layer counts and not a ceiling.
Source: OMG Meta Object Facility (MOF) Core Specification 2.5.1 (formal/2019-10-01), 7.3 How Many Meta Layers? · MOF / 7.3 How Many Meta Layers? / reflection across metalayers
3/5 · The MOF & Metamodeling · hard
A reflective client holds two elements of one metaclass whose property values are all identical, and two DataType values with identical content. It calls equals on each pair. What results does MOF Reflection define?
A. false for the elements, true for the data values
B. true for the elements, true for the data values
C. true for the elements, false for the data values
D. false for the elements, false for the data values
Answer: A. Object.equals in section 9.4 distinguishes two cases. For instances of Class it returns true if both are references to the same object, so two distinct elements with identical property values are not equal. For instances of DataType it returns true when the values are the same. Other cases return false.
  • A. Section 9.4: for instances of Class equals is true only for references to the same object; for DataType it compares values.
  • B. Elements are compared by reference identity, so identical contents are not enough.
  • C. This inverts the rule: data values are compared by value, elements by identity.
  • D. Data values with the same value are equal, so the second result is wrong.
Source: OMG Meta Object Facility (MOF) Core Specification 2.5.1 (formal/2019-10-01), 9.4 · MOF / 9.4 Object / equals semantics
4/5 · The MOF & Metamodeling
While validating a metamodel instance against the CMOF constraints, a reviewer finds an Integer attribute value of an element holding 2147483648. What is the verdict?
A. invalid, the value falls outside the 32-bit two's complement range
B. valid, CMOF itself leaves Integer values unbounded in instances
C. valid, String values carry a length limit but Integer values do not
D. invalid, CMOF caps Integer values at the 16-bit signed range
Answer: A. CMOF constraint [3] in 14.4 requires each Integer attribute value to be representable in 32-bit two's complement, from -2^31 through 2^31 - 1. The value 2147483648 is one above the maximum. Constraint [4] separately limits String length to 65535 characters.
  • A. CMOF constraint [3] limits Integer values to -2^31 through 2^31 - 1, and 2147483648 equals 2^31.
  • B. CMOF does bound Integer to a 32-bit range.
  • C. CMOF limits both String length (65535) and the Integer range.
  • D. The cap is 32 bits; the 65535 figure belongs to String length.
Source: OMG Meta Object Facility (MOF) Core Specification 2.5.1 (formal/2019-10-01), 14.4 · MOF / 14.4 CMOF Constraints / Integer range
5/5 · The MOF & Metamodeling
UML is defined using a constrained subset of itself. Viewing the UML metamodel from the MOF perspective, the metaclass Comment has an attribute named body. How is this attribute viewed?
A. as an instance of the metaclass Property whose name is body
B. as an instance of the metaclass Class whose name is body
C. as a subclass of the metaclass Property named body
D. as an instance of the metaclass Comment whose name is body
Answer: A. Section 6.2 explains that UML metaclasses are viewed from the MOF perspective as instances of Class. Its example is Comment: the attribute body of Comment is seen as an instance of Property, with the name property set to body.
  • A. Section 6.2 describes the attribute body as an instance of Property whose name property has the value body.
  • B. Class describes metaclasses such as Comment itself, not their attributes.
  • C. An attribute is an instance of Property, not a specialization of it.
  • D. Comment is the owner metaclass; its own instances are user-level comments.
Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 6.2, p. 54 · UML / 6.2 Architectural Alignment / metaclasses as instances of MOF classes
Try 6 more free OCUP 2 Advanced questions → See the whole OCUP 2 Advanced bank

Other OCUP 2 Advanced areas

The same kind of free sample for every other section of the OCUP 2 Advanced bank:

Alf14 qfUML15 qCommon Structure37 qClassification8 qStateMachines14 qCommon Behavior12 qStructured Classifiers14 qActivities18 qInteractions13 qActions15 q

Practise OCUP 2 Advanced with instant feedback

6 free questions in study mode · no card · full OCUP 2 Advanced bank with area filters and the error log: $9 (regularly $15) one-time · no dumps, no ads.

Start OCUP 2 Advanced free →
Read next
OCUP 2 Advanced: Who Needs the Top UML Certification and How It Differs from Intermediate OCUP 2 Advanced costs $350, needs Foundation and Intermediate and puts 24% of the exam on MOF, fUML and Alf. Who needs the top UML level and who can stop.
ExamDeck is an independent study tool, not affiliated with, endorsed by, or sponsored by OMG. OCUP 2 Advanced and related marks are trademarks of their respective owners, used for identification only. Exam facts checked against official OMG materials (as of November 2026); always confirm current details with the vendor before booking.