250+ MCQs on UML Package and Component Diagrams and Answers

Software Design Multiple Choice Questions on “UML Package and Component Diagrams”.

1. Which among the following are not the valid notations for package and component diagram?
a) Notes
b) Box
c) Extension Mechanisms
d) Packages

Answer: b
Clarification: Boxes are the notations for box and line diagram.

2. Which of the following statement is false?
a) A note is a dog-eared box connected to any model element by a dashed line
b) The main way to extend UML is by constraints, properties, etc
c) A dependency relation holds between two entities D and I where change in I does not affect D
d) All of the mentioned

Answer: c
Clarification: A dependency relation holds between two entities D and I where change in I affects D.

3. Which of these depicts the true definition for the UML extensions?
a) A constraint is a statement that must be true of the entities designated by one or more model elements
b) A property is a characteristic of the entity designated by a model element
c) A stereotype is a UML model element given more specific meaning
d) All of the mentioned

Answer: d
Clarification: All the mentioned statements are true definitions.

4. Which of the following is incorrect in reference to dependency?
a) Module D uses module I when a correct version of I must be present for D to work correctly
b) Module D depends for compilation on module I
c) Class I imports elements from package D
d) None of the mentioned

Answer: c
Clarification: Class D imports elements from package I.

5. What is a collection of model elements called?
a) Box
b) Dependency
c) UML packages
d) Package members

Answer: d
Clarification: UML Package is a collection of model elements called package members.

6. A package diagram consists of the following?
a) Package symbols
b) Groupings of Use cases, classes, components
c) Interface
d) Package symbols, Groupings of Use cases, classes & components

Answer: d
Clarification: A package diagram consists of package symbols, groupings of use cases, classes, components, etc.

7. What types of units does Component follow?
a) Modular Unit
b) Replaceable Unit
c) Unit with well defined interface
d) All of the mentioned

Answer: d
Clarification: A component consists of modular, replaceable unit with well defined interface.

8. Components can be represented by which of the following?
a) Component symbols
b) Stereotypes
c) Rectangular boxes
d) Component symbols & Stereotypes

Answer: d
Clarification: Components can be expressed by Symbols and stereotypes.

9. What does a component diagram consists of?
a) Components, their Relationship to the environment
b) Packages and dependency
c) Internal structure
d) Internal structure, Components & their Relationship to the environment

Answer: d
Clarification: Component diagram consists of components, relationship to the environment and their internal structure.

10. Which of these is true with respect to interfaces?
a) Interfaces in component diagram defines relationship between components and environment
b) Interfaces realized by a class or a component are required interfaces
c) Interface on which a class or component depends are called provided interfaces
d) All of the mentioned

Answer: a
Clarification: Interfaces realized by a class or a component are provided interfaces whereas Interfaces on which a class or component depends are called required interfaces.

11. What is a delegation connector?
a) A delegation connector ties a component interface to one or more internal classes or components
b) Delegation connectors are solid arrows stereotyped >
c) A delegation connector may also extend from an internal class to an external interface
d) All of the mentioned

Answer: d
Clarification: All of the mentioned options represents delegation connector and are true.

12. Which of these are diagrammatic heuristics?
a) Use notes, constraints, properties and stereotypes to add information to UML models
b) Use Stereotypes to name dependencies
c) Use packages to group elements in static models
d) All of the mentioned

Answer: d
Clarification: All of the mentioned are the respective heuristics to be followed for the UML models diagram.

Leave a Reply

Your email address will not be published. Required fields are marked *