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

Object-Oriented Data Modeling Questions and Answers

21.

Multiplicity is the same as what concept for an ERD?

Answer: D

Correct answer: Cardinality

Multiplicity in UML states how many instances of one class may be associated with an instance of another, which is exactly what cardinality expresses on an entity-relationship diagram. The notation differs - 0..1, 1..*, 3..5 against the crow’s foot - but the concept is the same.

Please log in or register to report this question.

22.

The fact that the same operation may apply to two or more classes is called what?

Answer: B

Correct answer: Polymorphism

Polymorphism means many forms: the same operation name applies across several classes, each supplying its own implementation. A caller invokes print or area without knowing which class it is dealing with, and the right code runs. Inheritance is the mechanism that most often makes it possible, but the two are not the same thing.

Please log in or register to report this question.

Answer: A

Correct answer: An object is an instance of a class.

The class is the definition and the object is a particular thing built to it - the class Customer against the object representing one named customer. Both encapsulate operations as well as data, which is the point of the object-oriented approach and what distinguishes an object from a record.

Please log in or register to report this question.

24.

An operation that alters the state of an object is known as a constructor operation.

Answer: B

Correct answer: False

An operation that alters the state of an object is an update or modifier operation. A constructor creates a new instance; it does not alter an existing one. The third kind, a query, reports on the state without changing it.

Please log in or register to report this question.

25.

A UML diagram includes which of the following?

Answer: D

Correct answer: All of the above.

The standard UML class symbol is a rectangle divided into three compartments by horizontal lines: the class name at the top, the attributes in the middle and the operations at the bottom. The lower compartments may be suppressed in a diagram where only the relationships matter, but all three belong to the notation.

Please log in or register to report this question.

26.

An object can have which of the following multiplicities?

Answer: D

Correct answer: All of the above.

Multiplicity states how many objects may participate, and the permitted values include zero, exactly one, and many. An optional association is written 0..1, a mandatory one 1, and an unbounded one 1..* or *. It is the zero case that distinguishes an optional participation from a required one.

Please log in or register to report this question.

27.

An aggregation is a stronger form of association relationship and is represented with a solid diamond at the aggregate end.

Answer: B

Correct answer: False

The first half is right and the second is not. Aggregation is drawn with a hollow diamond at the aggregate end; the solid diamond is reserved for composition, the stronger form in which the part is unshared and shares the whole’s lifetime.

Please log in or register to report this question.

Answer: D

Correct answer: All of the above.

All three are claimed for the approach and are related. A single set of concepts runs from analysis through design to code, so results are reusable and the model is comprehensible to users and analysts alike; and because the model matches the problem domain rather than the implementation, larger problems become tractable.

Please log in or register to report this question.

29.

A method defines the form or protocol of the operation, but not its implementation.

Answer: B

Correct answer: False

The terms are the other way round. An operation specifies the form or protocol - the name, the parameters and the result - while a method is the body that implements it. The distinction is what makes polymorphism expressible: one operation may have several methods, one in each class.

Please log in or register to report this question.

30.

A class is a concept, abstraction, or thing that makes sense in an application context.

Answer: A

Correct answer: True

This is the definition a class carries in analysis: something meaningful in the problem domain, whether a tangible thing, a role, an event or an abstraction. Identifying classes is therefore a modelling judgement about the application rather than a programming decision, which is why the same classes survive into design.

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