Software Design Questions and Answers – UML Package and Component Diagrams

This set of Software Design Multiple Choice Questions & Answers (MCQs) focuses 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: d
Explanation: All the mentioned statements are true definitions.
advertisement
advertisement

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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: d
Explanation: UML Package is a collection of model elements called package members.
Note: Join free Sanfoundry classes at Telegram or Youtube

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
View Answer

Answer: d
Explanation: 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
View Answer

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

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

Answer: d
Explanation: 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
View Answer

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

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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: d
Explanation: 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
View Answer

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

Sanfoundry Global Education & Learning Series – Software Architecture and Design.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.