Home › OCUP 2 Intermediate › Practice questions › Basic Structure
OCUP 2 Intermediate · OMG · Basic Structure · Bank updated 2026-11-03

OCUP 2 Intermediate practice questions: Basic Structure

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

These 5 questions come from the Basic Structure section of our OCUP 2 Intermediate bank (30 questions on this area, which carries 16% of the real exam). Every question is original, with the correct answer explained and linked to the source it is drawn from.

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

Free: 6 questions in study mode, no card. All 30 Basic Structure questions and the full OCUP 2 Intermediate bank: $15 one-time.

1/5 · Basic Structure · easy
Package Archive directly owns the helper class Compressor. The modeler wants Compressor to be usable only by elements inside Archive. Which visibility marking on Compressor meets this aim in a model that UML 2.5.1 permits?
A'-Compressor', giving the class private visibility.
B'~Compressor', giving the class package visibility.
C'#Compressor', giving the class protected visibility.
D'Compressor' with no marker, leaving its visibility unset.
Answer: A. 12.4.5.8 Package constraints (PDF p. 320): if an element owned by a package has visibility, it is public or private (elements_public_or_private). The package notation in 12.2.4 (PDF p. 290) accordingly allows only '+' or '-' on packaged elements, and VisibilityKind (PDF p. 102) makes a private element visible only inside the Namespace that owns it and restricts package visibility to named elements that are not owned by packages. A PackageableElement owned by a Namespace must have a visibility, public by default (7.8.12.5, PDF p. 95). Source: OMG UML 2.5.1 specification
2/5 · Basic Structure
Package Core declares the class Account with the attribute owners : Person [2..3]. Package Ext declares its own class Account with the attribute owners : Person [1..2], and Ext owns a PackageMerge that merges Core into Ext. Under UML 2.5.1, what multiplicity does the resulting owners property of Ext::Account have?
A[2..2]
B[1..3]
C[1..2]
D[2..3]
Answer: B. Clause 12.2.3.3, transformations 9 and 10 (PDF p. 287), set the resulting lower bound of matching MultiplicityElements to the lesser of the matching lower bounds and the upper bound to the greater of the matching upper bounds. Here the lower bound is min(2,1) = 1 and the upper bound is max(3,2) = 3, giving [1..3], which is wider than either side. Intersecting the two ranges would give [2..2], which the merge rules never produce. Source: OMG UML 2.5.1 (formal/17-12-05), clause 12.2.3.3, PDF p. 287. Source: OMG UML 2.5.1 specification
3/5 · Basic Structure
A template class Mapping has the formal TemplateParameters K and V, and V has no default. The tool in use allows partial binding. A modeler creates the class NameMap with one TemplateBinding to Mapping that substitutes String for K and gives no substitution for V. How is NameMap treated?
AAs an ordinary class that can serve as the type of an attribute.
BAs a template, parameterized by the remaining parameter V.
CAs an ill-formed element until a substitution for V is added.
DAs a class in which V is silently replaced by String as well.
Answer: B. A bound element at least one of whose bindings leaves a TemplateParameter unbound is a partially bound element. The standard says it "is still considered to be a template", parameterized by the parameters that remain unbound, so it cannot be used like an ordinary class. Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 7.3.3.1, p. 66 Source: OMG UML 2.5.1 specification
4/5 · Basic Structure
Class Itinerary has the attribute stops : Stop [0..*]. The modeler specifies that the values of stops keep a defined order of positions and that the same Stop may appear at several positions. Which collection type do the values of stops form?
AA Set of Stop values
BA Sequence of Stop values
CAn OrderedSet of Stop values
DA Bag of Stop values
Answer: B. Table 7.1 maps the two properties to a collection type. Order with allowed repeats means isOrdered true and isUnique false, which UML names Sequence. Set is unordered and unique, OrderedSet is ordered and unique, Bag is unordered and non-unique. Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 7.5.3.2, p. 75-76 Source: OMG UML 2.5.1 specification
5/5 · Basic Structure
An analysis-level class Booking is split into the design-level classes BookingEntry, BookingPolicy and BookingLog. The modeler draws one Abstraction with Booking as supplier and the three design classes as clients. How does UML 2.5.1 interpret the supplier?
AIt maps separately into each of the three design classes, as independent mappings
BIt maps into the first-listed client, and the others derive from that one
CIt maps once into the three design classes, taken together as one group
DThe relationship is invalid until one Abstraction exists per design class
Answer: C. If an Abstraction has more than one client, the supplier maps into the set of clients as a group. The standard's example is an analysis-level Class split into several design-level Classes. The situation is similar with more than one supplier. Source: OMG Unified Modeling Language 2.5.1 (formal/17-12-05), 7.7.3.3, p. 80 Source: OMG UML 2.5.1 specification
Try 6 more free OCUP 2 Intermediate questions → See the whole OCUP 2 Intermediate bank

Other OCUP 2 Intermediate areas

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

Activities & Actions30 qInteractions31 qStateMachines & Use Cases49 qComponents29 qCommon Behavior30 qStructured Classifiers27 qClassification30 q

Practise OCUP 2 Intermediate with instant feedback

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

Start OCUP 2 Intermediate free →
Read next
OCUP 2 Foundation: Format, Cost and a Study Plan for the OMG UML Exam OCUP 2 Foundation: $350, 90 questions, 120 minutes, 60 correct to pass, Pearson VUE or online. A six-week UML study plan, checked 29 Sep 2026.
ExamDeck is an independent study tool, not affiliated with, endorsed by, or sponsored by OMG. OCUP 2 Intermediate and related marks are trademarks of their respective owners, used for identification only. Exam facts checked against official OMG materials (as of October 2026); always confirm current details with the vendor before booking.