OCUP 2 Intermediate study materials
OCUP 2 Intermediate study resources

OCUP 2 Intermediate cheat sheet

OCUP 2 Intermediate · Keep the key ideas within reach.

Quick reference

UML Elements and Attributes of Structures in Complex and Larger System Models

  • A Class owns Properties; the owned attribute list is navigable from the class end by default, while an association end with isNavigable=false is not reachable from the opposite class.

  • Multiplicity is written as lower..upper; a missing upper bound means 1, '' alone means 0.., and '1' is equivalent to '1..1'. Multiplicity on a Property constrains the number of values held at runtime.

  • Aggregation (shared, hollow diamond) and composition (composite, filled diamond) both decorate the whole end; only composition implies exclusive ownership and lifetime dependency of the part on the whole.

  • A Port is a Property typed by an Interface or Class on a Classifier's boundary; isConjugated=true reverses the provided/required polarity of that port's type.

  • Connector ends may carry a role and multiplicity; an assembly connector links a required interface (ball socket) to a provided interface (ball) between components without an explicit Association.

  • Generalization sets (isSubstitutable, powertype) order and group generalization relationships; a generalization set with isCovering=true asserts the subtypes exhaust the supertype.

  • A Classifier's isAbstract=true means no direct instances; abstract operations are shown in italics and must be realized by concrete specializations.

  • A StructuredClassifier's internal structure is expressed by owned Properties plus Connectors; parts are typed by Classifiers and are distinguishable from references by their composite aggregation.

  • Template parameters use TemplateParameter with ParameterableElement; a bound element (Binding) substitutes actuals, and a Classifier with unbound parameters cannot be instantiated directly.

Quick reference

Designing and Generating Interoperating Modules

  • A Component is a substitutable, encapsulated Classifier; its provided Interfaces are realized and its required Interfaces are used, expressible via InterfaceRealization and Usage dependencies.

  • Package merge combines element definitions so that the merging package's elements extend the merged ones; Package import adds only public members to the importing namespace's visibility.

  • An Interface is a Classifier with only public operations and no implementation; realizing Classifiers must supply a matching operation signature (name, parameter types, return type, exceptions).

  • Substitution (Substitution dependency) declares that a component can replace another at a collaboration point; it is distinct from Generalization and does not imply inheritance of structure.

  • Deployment diagrams place Artifacts on Nodes via «deploy»; a DeploymentSpecification carries execution parameters, and communicationPath connects Nodes that exchange signals.

  • Data type interoperability: use PrimitiveType versus DataType deliberately; a DataType has value semantics (no identity), so Properties typed by DataTypes must be compared by value.

  • Signal and Reception model asynchronous, one-way communication; a Reception is an operation with no return and is triggered by the named Signal, decoupling sender and receiver modules.

  • A Collaboration and CollaborationUse specify how classifiers cooperate to realize a use case or interface; role bindings connect the use's parts to concrete classifier parts.

Quick reference

Improving Upon Other Models

  • Refactoring rule: replace duplicated attribute sets with a shared DataType or a Generalization only when the duplicated elements have identical semantics, not merely identical names.

  • Lifting an Association class to a first-class Classifier is required when the link itself gains attributes, operations, or participates in further associations.

  • Replace a n-ary Association with a reified Classifier when the association's multiplicity constraints cannot express the intended business rule (e.g., per-pair uniqueness).

  • A Generalization is preferable to an Association when the subtype is fully substitutable for the supertype; if the subtype has additional incompatible state, use composition or delegation.

  • Move an operation from a subtype to the supertype when two or more subtypes declare the same signature with the same postcondition; keep it in the subtype when preconditions differ.

  • Introduce a Qualifier to reduce the effective multiplicity of an association end when the qualifier uniquely identifies the target within the source's context.

  • Replace a boolean flag attribute with a state machine or an enumeration when the flag's combinations encode mutually exclusive modes; flags that can co-occur stay as attributes.

  • A derived Property (isDerived=true, shown with '/') documents a computed value; it must be accompanied by an OCL derivation rule or a behavioral description to be unambiguous.

Quick reference

Explaining the Full UML Diagram Suite to Model Users

  • Structural diagrams: Class, Object, Package, Component, Composite Structure, Deployment, Profile. Behavioral diagrams: Use Case, Activity, State Machine, Interaction (Sequence, Communication, Timing, Interaction Overview).

  • A Sequence diagram shows lifelines and messages ordered by time; a Communication diagram shows the same interaction with links numbered to express ordering.

  • A Timing diagram plots state or value changes of lifelines against a time axis; an Interaction Overview diagram composes Interactions with Activity-like control flow nodes.

  • Activity diagrams use tokens flowing through nodes; a fork/join is concurrency, a decision/merge is choice, and a «flow final» ends one path while «activity final» ends the whole activity.

  • State Machine: a transition fires on trigger [guard] / effect; entry, exit, and do behaviors belong to the State, and a composite State may have its own regions.

  • Use Case diagrams relate Actors to UseCases with Association, include (mandatory inclusion), extend (conditional extension at an ExtensionPoint), and Generalization between actors or use cases.

  • Profile diagrams define Stereotypes, TaggedValues (as Properties), and Constraints applied to a referenced metamodel; «metaclass» Extensions bind a stereotype to a UML metaclass.

  • Object diagrams instantiate Classifiers: slots hold values, links instantiate associations, and the name is underlined to denote an instance specification.