Preparing for UML 2 Advanced certification means understanding how modeling concepts work together and recognizing what a model actually specifies. How can a Generalization Set connect room categories to their policies? How do templates help reuse a reservation model? What roles do Alf and fUML play in specifying executable behavior? This article explores these topics through five practice questions and a shared hotel example, explaining each correct answer and why the alternatives fall short.
A hotel models StandardRoom and Suite as specializations of HotelRoom. Each of these specializations must have exactly one corresponding RoomCategory record that stores its standard check-in time and checkout time. Two categories may use the same times.
Which UML class diagram expresses this requirement? Select one answer.

C is correct. The label :RoomCategory beside the shared generalization arrow identifies RoomCategory as the power type of this Generalization Set. Its instances correspond one-to-one to the specific classifiers in the set. Here, one record corresponds to StandardRoom, and another corresponds to Suite. The attributes belong to RoomCategory, so each record holds the times for its category. See UML 2.5.1, sections 9.7.3 and 9.7.4.
For example, the following values satisfy the requirement:
| Room Classifier | Corresponding Policy Record | Standard Check-in | Standard Checkout |
|---|---|---|---|
StandardRoom |
standardPolicy |
3:00 p.m. | 11:00 a.m. |
Suite |
suitePolicy |
2:00 p.m. | 12:00 p.m. |
In this example, suites offer earlier check-in and later checkout. Each policy record stores the times for its corresponding room classifier.
Adding Suite 802 alongside Suite 801 adds another room, while the classifier Suite and its corresponding record suitePolicy remain the same. Adding Penthouse as a third specialization in this Generalization Set would require a third corresponding record.
The two policy records could also contain identical times. The power type requires a distinct corresponding instance for each specific classifier; it does not require their attribute values to differ.
An effective way to test each option is to construct an example that its diagram allows but the hotel requirement rules out.
A. The time attributes belong to individual rooms.
Both subclasses inherit the attributes from HotelRoom. Suite 801 could store a standard check-in time of 2:00 p.m., while Suite 802 stores 4:00 p.m. That is valid under A.
Under the hotel's rule, both suites use the one policy record for Suite, which specifies 2:00 p.m. check-in in our example. Even giving both rooms identical values in A would leave the required category record unmodeled.
B. Each room links to exactly one policy record.
Read the 1 beside RoomCategory from the perspective of an individual room. Suite 801 could link to policyA, specifying 2:00 p.m. check-in, and Suite 802 could link to policyB, specifying 4:00 p.m. check-in. Each room would still link to exactly one record.
The opposite multiplicity, 0..*, allows several rooms to share a policy, but nothing in B requires all suites to share the record corresponding to Suite. This makes B a particularly plausible wrong answer.
D. The Generalization Set has a name.
The label roomCategory identifies the set containing the two generalizations. The separate class RoomCategory has the desired attributes.
Imagine the hotel has two suites and just one RoomCategory instance called winterPolicy. D allows that arrangement because it specifies no correspondence between category records and room classifiers.
C requires both StandardRoom and Suite to have their own corresponding instances. The colon is what gives the label that meaning.
| Proposed Situation | Valid under C? | Reason |
|---|---|---|
One policy record corresponds to both StandardRoom and Suite. |
No | Two specific classifiers would share one corresponding instance. |
Two distinct policy records both correspond to Suite. |
No | One specific classifier would have two corresponding instances. |
The hotel adds Suite 803 and continues to use suitePolicy. |
Yes | There is another room, while the classifier and its corresponding policy record are the same. |
| The hotel changes suite checkout to 11:00 a.m., matching standard rooms. | Yes | The records remain distinct. Matching attribute values do not violate the power type correspondence. |
A hotel accepts reservations for rooms and for meeting spaces. Both kinds of reservation need a start time, an end time, and a reference to the resource being reserved. The type of that resource differs.
A UML template lets us describe the common structure once and supply the appropriate resource type wherever we use it.
Suppose we define a class template named Reservation with one formal classifier parameter, Resource. Its property reservedResource: Resource uses that parameter as its type.

In the left binding, RoomReservation is the bound class, while HotelRoom replaces the formal parameter Resource. A RoomReservation represents a booking; its reservedResource property refers to a hotel room. The two bindings produce the property types shown below.
| Bound Class | Parameter Substitution | Resulting Property |
|---|---|---|
RoomReservation |
Resource -> HotelRoom |
reservedResource: HotelRoom |
MeetingSpaceReservation |
Resource -> MeetingSpace |
reservedResource: MeetingSpace |
Read Resource -> HotelRoom as “replace the formal parameter Resource with the actual classifier HotelRoom.” In the substitution expression Resource -> HotelRoom, -> separates the formal parameter from the actual model element supplied for it. The dashed «bind» arrow in the diagram points from the bound class toward the template.
The template signature lists the formal parameters in order. A template binding supplies actual model elements for those parameters. The element that owns the binding is the bound element.
For example, RoomReservation is a bound class. A guest’s reservation for Room 801 on Friday is an instance of that class. The actual template argument is the classifier HotelRoom, while Room 801 is an individual room referenced by the reservation.
The same idea applies outside hospitality. An expense claim and a purchase order might follow the same approval process. A template named ApprovalRequest could have a formal parameter Document and define the properties subject: Document and submittedAt: DateTime.
Binding Document -> ExpenseClaim makes the subject of an expense approval an ExpenseClaim. Binding Document -> PurchaseOrder gives a purchase approval a PurchaseOrder as its subject.
Which element specifies the ordered set of formal template parameters for a template?
A. Template Parameter
B. Templateable Element
C. Template Signature
D. Template
Correct answer: C. A TemplateSignature specifies the ordered set. A TemplateParameter represents one entry, such as Resource. A TemplateableElement can own a signature. The template is the parameterized element as a whole.
If we extend Reservation to take both Resource and BookingPolicy, the template still has one signature, now with two entries.
A. A bound element specifies the ordered set of formal template parameters for a template.
B. A bound element allows classifiers, collaborations, packages, and operations to be parameterized.
C. UML provides no definition of a bound element.
D. A bound element may have multiple bindings, possibly to the same template.
Correct answer: D. The hotel table shows two different bound classes, each with one binding. D describes a different possibility: a single bound element can own several bindings, even when they target the same template.
For example, a HotelBookingServices class could bind an operation-only BookingLookup class template twice, once for HotelRoom and once for MeetingSpace.
If the template defines findBookings(resource: Resource), the two resulting operations have different parameter types. The combined class must still satisfy UML’s rules for distinguishable operations.
A describes the signature. B describes what templates enable in general. C is incorrect because UML defines the semantics of a bound element in section 7.3.3.4.
For the UML rules behind these template questions, see UML 2.5.1, section 7.3, Templates.
A hotel models RoomReservation in UML. The team wants to specify its reservation behavior using a textual language designed for UML, with execution semantics defined through a mapping to fUML.
Which approach meets this requirement? Select one answer.
A. Use Alf to express the reservation behavior textually.
B. Use MOF to write the executable statements of the reservation behavior.
C. Use MDA as the textual language for the reservation behavior.
D. Use fUML as the textual syntax for the reservation behavior.
Correct answer: A. Alf, short for Action Language for Foundational UML, provides a textual representation for UML modeling elements. Its execution semantics are defined through a mapping to fUML.
This lets the team express detailed behavior using text while retaining its connection to the UML model. See the OMG Alf specification.
In our hotel example, that behavior could create a RoomReservation, assign its reservedResource, record the booking dates, and return the new reservation. Alf can be useful when expressing these details graphically would require many individual actions and connections.
| Option | Explanation |
|---|---|
| B. MOF | MOF supports defining metamodels. It does not provide the requested language for writing reservation behavior. |
| C. MDA | MDA is an approach to model-driven development, including models and transformations. It is not a textual action language. |
| D. fUML | fUML defines execution semantics for a foundational subset of UML. Alf supplies the textual syntax described in the question. |
Practical takeaway: Alf lets us express the behavior textually. fUML supplies the foundational execution semantics to which that text maps. The next question examines this distinction from the execution side.
Which standard provides the precise definition of the execution semantics for a set of higher-level UML modeling concepts?
A. fUML
B. Alf
C. MDA
D. MOF
Correct answer: A. fUML. The full specification title is Semantics of a Foundational Subset for Executable UML Models. It defines precise execution semantics for a foundational subset of UML, providing a basis for executable models and for defining the semantics of higher-level modeling concepts.
It does not define execution semantics for every UML element. See the OMG fUML specification.
“Execution semantics” describes what happens when a model executes. For example, creating an object produces a new runtime object, reading a property retrieves its values, and writing a property changes those values. The model needs rules for these effects and for how actions receive inputs and produce outputs.
Suppose the hotel defines an activity to create a room reservation. It receives a selected room, guest details, and booking dates. Availability checking is handled before this activity begins.
For this example, assume that RoomReservation also has a guest property, omitted from the earlier diagram. Its startTime and endTime properties record the booking period.
| Step | Modeled Behavior | Example Result |
|---|---|---|
| 1 | Create an object of the bound class RoomReservation. |
A new reservation object exists. |
| 2 | Set its reservedResource property. |
The reservation refers to Room 801, an instance of Suite. |
| 3 | Set guest, startTime, and endTime. |
The reservation records who is staying and when. |
| 4 | Return the reservation object. | The caller receives the newly created reservation. |
This connects all three topics in the article. Suite is a room classifier in our Generalization Set. RoomReservation uses the structure obtained by binding Reservation with Resource -> HotelRoom. The activity describes behavior that creates and populates a reservation object.
To execute this behavior using fUML, we need a model expressed using supported elements and an execution environment that implements their semantics. The template example explains how we obtain the bound structure; it does not imply that fUML executes template binding as a booking-time operation.
| Option | What It Contributes | Why It Is Not the Answer |
|---|---|---|
| Alf | Textual syntax for UML models, with execution semantics defined through a mapping to fUML. | The question asks for the foundational execution semantics. Alf uses that foundation. |
| MDA | An approach to software development using models and transformations, including platform-independent and platform-specific models. | It does not define the action-by-action execution semantics asked for here. |
| MOF | A foundation for defining metamodels, including the structure of modeling languages. | Defining a language’s metamodel does not by itself define how its behavioral models execute. |
For further detail, see the OMG Alf specification, MDA overview, and MOF overview.
Drawing an activity with actions named Create reservation and Send confirmation communicates the intended behavior. Those names alone do not supply its implementation.
Object creation and property updates need to be specified through executable behavior. Sending a real confirmation email also requires an implementation or integration with an external service. A simulation may instead use a test implementation that records the outgoing message.
Execution also does not prove that the business rules are correct. An executable activity could still accept a checkout date before the check-in date if the model fails to check it. Precise execution semantics let us determine what the model does; tests and requirements help us judge whether that behavior is appropriate.
No. Generalization Sets also appear in the UML 2 Intermediate scope. This article uses a power type question to explore the relationship between classifiers and their corresponding instances in more detail.
For a broader explanation, read UML Generalization Sets and Power Types Explained.
No. Our example gives standard rooms an 11:00 a.m. checkout and suites a 12:00 p.m. checkout. The hotel could change suite checkout to 11:00 a.m. without violating the power type correspondence. The policy records would still have distinct identities.
No. Binding Resource -> HotelRoom supplies a model element for a formal parameter. Creating a particular guest’s RoomReservation is a separate operation that produces an instance of the bound class.
No. fUML defines execution semantics for a foundational subset of UML. A diagram is a view of a model, and its visible labels may omit the behavior required for execution. Execution also requires suitable tool support.
No. Alf offers a textual way to express UML models. An fUML model can also be constructed using supported UML modeling elements directly. The execution environment must support the resulting model.
When reviewing a practice question, explain why each incorrect option fails. Construct a small example, such as two suites with different policy records or one template bound to two resource types. This makes the distinction easier to remember and apply in your own models.
Explore my UML 2 Advanced practice questions on eduMAX for further preparation. The hotel Generalization Set question in this article is included in the set.
I am Filip Stachecki, founder of eduMAX, with more than 20 years of training and consulting experience. I have been a member of OMG certification exam teams since 2013 and have contributed to the scope and official questions for UML 2 OCUP 2 and BPM 2 OCEB 2 certifications. I hold the UML 2 OCUP 2 Advanced and BPM 2 OCEB 2 Business Advanced certifications.
The questions discussed here are educational practice material. The explanations connect specification concepts with practical modeling examples. You can learn more about my experience on the About me page.