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

Object-Oriented Data Modeling Questions and Answers

1.

In an object diagram, an object is represented as a rectangle with two compartments.

Answer: A

Correct answer: True

An object diagram shows instances rather than classes, so its rectangles carry the object name with its class in the top compartment and the actual attribute values in the second. There is no third compartment, because operations belong to the class and are not repeated for each instance.

Please log in or register to report this question.

2.

Which of the following applies to a class rather than an object?

Answer: C

Correct answer: Scope

Scope distinguishes a class-scope feature, belonging to the class as a whole, from an instance-scope one belonging to each object. A count of all customers is a class-scope attribute, held once however many objects exist. Queries, updates and constructors all act on or produce individual instances.

Please log in or register to report this question.

3.

The reasons for overriding include extension, restriction, and optimization.

Answer: A

Correct answer: True

A subclass overrides an inherited operation for one of three reasons: to extend it with additional behaviour, to restrict it to a narrower case, or to optimise it using knowledge the subclass has and the superclass does not. In every case the operation’s interface is preserved - only its implementation changes.

Please log in or register to report this question.

4.

A derived element is typically shown by placing either a slash (/) or a stereotype of <<derived>> before the name of the element.

Answer: A

Correct answer: True

A derived element is one computed from others rather than stored, such as an age derived from a date of birth. UML marks it with a leading slash, or with the stereotype in guillemets, so a reader knows the value is not held independently and cannot be set directly.

Please log in or register to report this question.

5.

Composition does not allow an object to be part of more than one aggregate object.

Answer: A

Correct answer: True

This is what distinguishes composition from ordinary aggregation. The part belongs to exactly one whole, and its lifetime is bound to that whole, so it can be neither shared between two aggregates nor left behind when the aggregate is destroyed. Aggregation permits both.

Please log in or register to report this question.

6.

Multiple inheritance allows a class to inherit features from more than one superclass.

Answer: A

Correct answer: True

Multiple inheritance lets a class take features from several superclasses, and UML permits it. The practical difficulty is conflict - two superclasses supplying the same feature differently - which is why several implementation languages restrict inheritance to one class and use interfaces for the rest.

Please log in or register to report this question.

Answer: B

Correct answer: A class that has no direct instances, but whose descendants may have direct instances.

An abstract class exists to be inherited from, gathering common attributes and operations for its subclasses. It cannot be instantiated itself, since it is incomplete by design, but its concrete descendants can be. The name is conventionally shown in italics in UML.

Please log in or register to report this question.

Answer: A

Correct answer: Analysis, design, and implementation steps in the given order and using multiple iterations.

The phases keep their logical order - you cannot design what has not been analysed - but the process cycles through them repeatedly rather than once. Each iteration deepens the same model, which is what allows the analysis classes to survive into design and code and gives object-oriented development its characteristic continuity.

Please log in or register to report this question.

9.

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

Answer: D

Correct answer: Partial specialization rule

Incomplete means an instance of the supertype need not belong to any subtype, so some parent instances sit outside the specialisation. That is the partial specialization rule. It is the complement of complete, which corresponds to total specialization.

Please log in or register to report this question.

10.

A solid diamond represents a stronger form of aggregation, known as composition.

Answer: A

Correct answer: True

The diamond marks the whole end of a part-of relationship, and its filling records the strength: hollow for aggregation, where the part may be shared and may outlive the whole, and solid for composition, where it may do neither.

Please log in or register to report this question.

Loading…

Other Subjects

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