Free OMG-OCUP2-FOUND100 Exam Braindumps (page: 9)

Page 8 of 23

Choose the correct answer :

Consider the following diagram:



Which statement is always true about this diagram?

  1. There are infinitely many H objects inside Pckg.
  2. There are between 1 and 5 G objects inside Pckg
  3. For every H object, there are fewer than 5 G objects associated with it.
  4. There may be an G object which has no H object associated with it through gh.

Answer(s): D

Explanation:

The diagram shows a package Pckg that includes two classes G and H with a one-to-many association between them. The multiplicity '1..5' near class G on the 'gh' association end suggests that for each H object, there should be between 1 to 5 associated G objects. However, the '*' (multiplicity many) near class H on the 'gh' association end indicates that a G object can be associated with zero or more H objects. This implies that it's possible to have a G object that is not associated with any H object.


Reference:

UML 2.x Superstructure Specification: Multiplicity notations and association rules are clearly defined in the UML specifications, which detail the semantics of multiplicities and their implications for object association.

UML 2.x Infrastructure Specification: Further explains the basic constructs of the UML metamodel, which underpin the interpretation of multiplicities in associations.



Choose the correct answer :

In your model, you need to represent accounts.

Which statement supports using a Class, rather than a DataType. lor this purpose''

  1. The account is uniquely identified by its account number.
  2. The account number can change, but it would still be the same account.
  3. The account needs operations to transfer money into it or to withdraw money
  4. The account has attributes typed by Classes like account_holder; Person or bank_in_Charge Company

Answer(s): C

Explanation:

In UML, a Class is a template that defines the structure and behavior of objects, whereas a DataType is a type of classifier which specifies a domain of values without identity. Operations (such as money transfers and withdrawals) are behaviors that change the state of an object and, therefore, are defined in Classes rather than DataTypes. This suggests that accounts, which require operations to transfer and withdraw money, should be modeled as Classes.


Reference:

UML 2.x Superstructure Specification: Provides definitions for Classes and DataTypes, and details the circumstances under which each should be used. It specifically states that Classes can have operations while DataTypes cannot.

UML 2.x Infrastructure Specification: This foundational document provides an in-depth explanation of UML modeling constructs, supporting the use of Classes when operations are needed to manage an object's state.



Choose the correct answer :

Which statement describes the semantics of a Property that has the aggregation kind composite9

  1. The aggregation kind composite is semantically equivalent to namespace containment
  2. Instances of the composed object's type can exist only in the context of the composite object.
  3. When the Property's composite object ceases to exist, all of its composed objects also cease to exist.
  4. The Property's composed objects are part of a subset and the composite object is a union of the defined subsets.

Answer(s): C

Explanation:

In UML, the aggregation kind 'composite' is one of the two types of aggregation, shared and composite. Composite aggregation, also known as composition, implies that the composed objects do not have a separate lifecycle from the owner object and are parts of the whole. This is in contrast to shared aggregation (aggregation), where the parts can be shared with different owners and have their own lifecycle.

Let's look at the options:

A . Composite aggregation implies ownership and is related to, but not equivalent to namespace containment. Namespace containment is more about the scope for named elements rather than lifecycle management.

B .
While it's true that instances of the composed object's type are often associated only with the composite object, the key aspect of composite aggregation is not just the exclusive context but the lifecycle dependency, which is not captured in this option.

C . This option is correct because, in UML, composite aggregation (composition) implies that the parts are existentially dependent on the whole.
When the composite (whole) object is destroyed, so are all of its parts, indicating a strong lifecycle dependency between the composite object and its composed parts.

D . This option describes a relationship more akin to set theory than UML composition. In UML, composite aggregation doesn't deal with subsets and unions in the context of set theory.

Thus, the most accurate answer, according to the UML specification regarding composite aggregation, is C: When the Property's composite object ceases to exist, all of its composed objects also cease to exist.



Choose the correct answer :

Consider the following diagram:



According to the diagram, which statement describes the property db?

  1. The property db is a primary key
  2. The property db is a static property.
  3. The property db is inherited from a superclass.
  4. The property db is important and is emphasized by the modeler with an underline.

Answer(s): B

Explanation:

In UML, a static property is one that belongs to the class itself rather than any instance of the class. In UML diagrams, static properties are denoted by underlining the property name.

Now, let's review the options:

A . There is no UML notation in the diagram that specifies whether the property db is a primary key. Primary keys are a database concept and UML does not have a standard way to denote them.

B . The property db is underlined, which indicates that it is a static property. This is the correct UML notation for depicting a class-level attribute.

C . There is no indication in the diagram that db is inherited from a superclass. Inherited properties typically are not underlined (unless they are also static), and there is no superclass shown in the diagram.

D . Underlining in UML does not signify importance or emphasis by the modeler, it indicates that a property is static.

Therefore, the answer is B: The property db is a static property. This is based on standard UML notation as outlined in the UML 2.5 Specification by the Object Management Group (OMG), which dictates that static members (attributes or operations) are underlined in class diagrams.






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

OMG-OCUP2-FOUND100 Discussions & Posts