Software Design Questions and Answers – Modularity Principles

This set of Software Design Multiple Choice Questions & Answers (MCQs) focuses on “Modularity Principles”.

1. Which of the following fall under constructive design principles?
a) Modularity principles
b) Implementary principles
c) Aesthetic principles
d) All of the mentioned
View Answer

Answer: d
Explanation: All of the mentioned principles are known as constructive design principles.

2. What is the Aesthetic principle among the following?
a) High quality programs can be constructed from self contained, understandable parts or modules
b) A design will be more or less easy to be build
c) Beauty is one of the important factor to be acknowledged as design principle
d) None of the mentioned
View Answer

Answer: c
Explanation: Aesthetic principle states Beauty as one of the most important factor to be acknowledged.

3. Which of these distinctions of modular programs over non modular are true?
a) They are not that easier to understand and explain
b) They are not easier to document
c) They are easier to change
d) Testing and Debugging is complex comparatively
View Answer

Answer: c
Explanation: Modular programs are easier to explain and understand, easier to document, easier to change and also easier to test and debug.
advertisement
advertisement

4. Which of these comes under the Modularity principle?
a) Small modules
b) Coupling
c) Cohesion
d) All of the mentioned
View Answer

Answer: d
Explanation: All the mentioned follows the modularity principle.

5. What does Coupling mean?
a) Coupling is the degree of connection between pair of module
b) Coupling is the degree to which a module’s part are related to one another
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: a
Explanation: Coupling is the degree of connection between pair of module.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. Which of the following is true?
a) Module coupling should be maximized
b) Module cohesion should be minimized
c) Modules should not have access to unneeded resources
d) Design with small modules are not better
View Answer

Answer: c
Explanation: Module coupling should be minimized, module cohesion should be maximized, design with small modules are always better, modules should not access unneeded resources( principle of least privilege).

7. Which of the following information should be kept hidden?
a) Internal data representation such as data types and structures
b) Volatile design decisions such as size, capacities, waiting time etc
c) Names, parameters, return types of operations provided by module
d) Internal data representation and volatile design decisions should be kept hidden
View Answer

Answer: d
Explanation: Names, parameters, return type are public information need not be hidden whereas internal data representation and volatile design decisions should be kept hidden.
advertisement

8. Which of the following violates principle of least privilege?
a) Modules that import packages
b) Modules with unneeded access to files
c) Classes with reference to Objects
d) All of the mentioned
View Answer

Answer: d
Explanation: All of the mentioned statements violated principle of least privilege.

9. Which of these is correct with context to coupling?
a) Failure to hide information leads to loose coupling and cannot be avoided
b) Modules that communicate using special data types and structures are less tightly coupled than modules with simple values
c) When modules communicate only through public module interface, their coupling strength is proportional to the number of messages and number of data passed in between
d) All of the mentioned
View Answer

Answer: c
Explanation: Failure to hide information leads to tight coupling, Modules with special data types are more tightly coupled.
advertisement

10. Which of these is correct with the context of cohesion?
a) Cohesion is least in modules that have a single clear, logically independent responsibility or role
b) Cohesion can not be achieved by forming modules that implement data types
c) One way to increase cohesion is to build a module hierarchy reflecting the level of abstraction in a program
d) All of the mentioned
View Answer

Answer: c
Explanation: Cohesion is highest in modules that have a single clear, logically independent responsibility or role, Cohesion can be easily achieved by forming modules that implement data types are the correct statements.

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

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.