Machine-translated by Google. Questions are authored in English.
Top

Object-Oriented Data Modeling Questions and Answers

11.

Which of the following is a technique for hiding the internal implementation details of an object?

Answer: A

Correct answer: Encapsulation

Encapsulation packages data with the operations that act on it and exposes only the interface, so the internal representation can change without disturbing anything that uses the object. Polymorphism and inheritance are separate principles, concerned with many forms of one operation and with sharing structure between classes.

Please log in or register to report this question.

Answer: A

Correct answer: Expresses a part-of relationship and is a stronger form of an association relationship.

Aggregation says that one object is part of another - a wheel of a car, a chapter of a book - which is more specific than a plain association. It is nevertheless weaker than composition, in which the part cannot be shared and does not outlive its whole.

Please log in or register to report this question.

13.

An object's state is determined by its attribute values and links to other objects.

Answer: A

Correct answer: True

State is what an object currently is, and that is captured both by its own attribute values and by the objects it is linked to. The links matter as much as the attributes: an order’s state includes which customer it belongs to, and that is held in the association rather than in an attribute of its own.

Please log in or register to report this question.

14.

When a business rule involves three or more graphical symbols, you can show the constraint as a note and attach the note to each of the symbols by a dashed line.

Answer: A

Correct answer: True

A constraint involving two symbols can be written along the line between them, but one involving three or more has no single line to sit on. UML therefore allows it to be written in a note and attached to each participating symbol by a dashed line - the same mechanism used for comments generally.

Please log in or register to report this question.

15.

The UML notation is useful for graphically depicting an object-oriented analysis or design model.

Answer: A

Correct answer: True

UML exists precisely for this purpose: a standard graphical notation in which an analysis or design model can be recorded and communicated. Because the same notation serves both, the analysis model can be elaborated into the design model rather than translated into a different language.

Please log in or register to report this question.

16.

The term Complete for a UML has the same meaning as which of the following for an EER diagram?

Answer: C

Correct answer: Total specialization rule

Complete means every instance of the supertype must belong to one of the subtypes, so the specialisation covers the whole of the parent. That is precisely the total specialization rule of an extended entity-relationship diagram. Its opposite, incomplete, corresponds to partial specialization.

Please log in or register to report this question.

17.

Each association has two or more roles.

Answer: A

Correct answer: True

Each end of an association is a role, naming the part that class plays in the relationship. A binary association therefore has two roles, and an n-ary association has n. Role names matter most in a recursive association, where the same class appears at both ends and only the roles distinguish them.

Please log in or register to report this question.

18.

Composition is a stronger form of which of the following?

Answer: A

Correct answer: Aggregation

Composition is aggregation with ownership and coincident lifetime: the part belongs to exactly one whole and is destroyed with it. Aggregation is the looser part-of relationship in which the part may exist independently and may be shared. The notation reflects the strength - a hollow diamond for aggregation, a solid one for composition.

Please log in or register to report this question.

Answer: A

Correct answer: Creates a new instance of a class

A constructor brings an object into existence and gives its attributes their initial values. Updating an existing instance is an update or modifier operation, and removing one is a destructor - three distinct kinds of operation with three distinct effects on the object’s lifetime.

Please log in or register to report this question.

20.

In UML, a class is represented by a rectangle with three compartments separated by vertical lines.

Answer: B

Correct answer: False

The three compartments are separated by horizontal lines, stacking the class name above the attributes above the operations. The rest of the statement is right; only the orientation is wrong.

Please log in or register to report this question.

Loading…
Tags: Object-Oriented Data Modeling Questions and Answers || Object-Oriented Data Modeling MCQ Questions and Answers || Object-Oriented Data Modeling GK Questions and Answers || Object-Oriented Data Modeling GK MCQ Questions || Object-Oriented Data Modeling Multiple Choice Questions and Answers || Object-Oriented Data Modeling GK || GK on Object-Oriented Data Modeling || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database