Unit II Software
Unit II Software
2. "Design complexity" in software engineering refers to: a) The number of lines of code
in the program b) The intricacy of interactions and dependencies within the system c) The
difficulty in understanding user requirements d) The time taken to design the system
5. "Low cohesion" within a module indicates that: a) The module performs a well-
defined set of related tasks b) The module's elements are loosely related and perform
diverse tasks c) The module is highly independent and reusable d) The module is easy to
understand and modify
Answer: b) The module's elements are loosely related and perform diverse tasks
Answer: a) Modularity
Answer: c) Recurring solutions to common problems that are ineffective and often
counter-productive
10. Which of the following is a key aspect of addressing basic issues in software design?
a) Focusing solely on functional requirements b) Ignoring non-functional requirements
initially c) Balancing various design principles and quality attributes d) Starting coding
immediately without a detailed design
Modularity
12. The benefits of modularity include: a) Increased complexity and development time b)
Easier understanding, maintenance, reuse, and independent development c) Tighter
coupling and reduced cohesion d) Reduced flexibility and adaptability
13. "Functional modularity" is based on: a) Grouping data and operations together b)
Decomposing the system based on functions or processes c) Organizing modules in
layers d) Distributing modules across a network
Answer: b) Grouping data and operations (methods) that operate on that data into objects
18. Modularity supports which software engineering principle? a) "Code and fix"
approach b) "Divide and conquer" approach c) "Big bang integration" approach d)
"Monolithic design" approach
20. Modularity is essential for managing complexity in: a) Only small-scale software
projects b) Only large-scale software projects c) Both small and large-scale software
projects, but more critical for large projects d) Primarily hardware design, not software
design
Answer: c) Both small and large-scale software projects, but more critical for large
projects
Cohesion
21. Cohesion in software design refers to: a) The degree of interdependence between
modules b) The degree to which elements within a module are functionally related c) The
size and complexity of a module d) The performance efficiency of a module
Answer: b) The degree to which elements within a module are functionally related
22. High cohesion is generally desirable because it leads to: a) Modules that are difficult
to understand and maintain b) Modules that are focused, single-purpose, and easier to
reuse and maintain c) Modules with many unrelated responsibilities d) Modules that are
tightly coupled with other modules
Answer: b) Modules that are focused, single-purpose, and easier to reuse and maintain
23. "Functional cohesion" is considered the: a) Weakest type of cohesion b) Strongest and
most desirable type of cohesion c) Most common type of cohesion in practice d) Least
important type of cohesion
24. "Logical cohesion" occurs when: a) Module elements are grouped because they
perform similar functions logically, but are not related functionally b) Module elements
are grouped because they are executed in sequence c) Module elements are grouped
because they access the same data d) Module elements are grouped because they are
located in the same physical memory location
Answer: a) Module elements are grouped because they perform similar functions
logically, but are not related functionally
25. "Sequential cohesion" means that: a) Module elements are grouped because the output
of one element serves as input to the next b) Module elements are grouped because they
are executed in parallel c) Module elements are grouped because they perform the same
function repeatedly d) Module elements are grouped because they are logically related
Answer: a) Module elements are grouped because the output of one element serves as
input to the next
Answer: b) Module elements are grouped because they operate on the same input or
output data
27. "Procedural cohesion" is characterized by: a) Module elements grouped based on the
order of procedural steps in a task, even if functionally unrelated b) Module elements
grouped because they perform similar functions c) Module elements grouped because
they operate on the same data d) Module elements grouped because they are logically
related
Answer: a) Module elements grouped based on the order of procedural steps in a task,
even if functionally unrelated
28. "Temporal cohesion" occurs when: a) Module elements are grouped because they are
executed at the same time b) Module elements are grouped because they are logically
related c) Module elements are grouped because they operate on the same data d) Module
elements are grouped because they are executed in sequence
Answer: a) Module elements are grouped because they are executed at the same time
29. "Coincidental cohesion" is the: a) Strongest type of cohesion b) Weakest and least
desirable type of cohesion, where elements are unrelated c) Most common type of
cohesion in practice d) Most efficient type of cohesion in terms of performance
Answer: b) Weakest and least desirable type of cohesion, where elements are unrelated
30. Aiming for high cohesion in module design helps in: a) Increasing coupling between
modules b) Reducing module size and complexity c) Making modules more general-
purpose and reusable d) Making modules harder to understand and maintain
31. Coupling in software design refers to: a) The degree of cohesion within a module b)
The degree of interdependence and interconnections between modules c) The size and
complexity of modules d) The performance of interactions between modules
32. Low coupling is generally desirable because it leads to: a) Systems that are harder to
change and maintain b) Systems where changes in one module are less likely to affect
others c) Modules that are less reusable d) Modules with unclear interfaces
Answer: b) Systems where changes in one module are less likely to affect others
33. "Data coupling" is the: a) Tightest form of coupling b) Loosest and most desirable form
of coupling c) Most complex form of coupling d) Least common form of coupling
35. "Control coupling" occurs when: a) Modules share and modify the same global data b)
One module passes control flags or switches to another module, influencing its execution
logic c) Modules interact through well-defined interfaces and data parameters d) Modules
are grouped based on temporal relationships
Answer: b) One module passes control flags or switches to another module, influencing
its execution logic
36. "Common coupling" (or global coupling) is characterized by: a) Modules interacting
through well-defined interfaces b) Modules sharing and modifying global data c)
Modules passing data parameters to each other d) Modules being logically related but
functionally independent
37. "Content coupling" (or pathological coupling) is the: a) Loosest form of coupling b)
Tightest and most undesirable form of coupling, where one module directly modifies the
internal data or control flow of another c) Most common form of coupling d) Most
efficient form of coupling
Answer: b) Tightest and most undesirable form of coupling, where one module directly
modifies the internal data or control flow of another
38. "Stamp coupling" (or data-structure coupling) involves modules passing: a) Simple
data parameters b) Control flags c) Complex data structures, but only using parts of the
structure d) Shared global data
Answer: c) Complex data structures, but only using parts of the structure
39. Layered architecture promotes: a) High coupling between layers b) Low cohesion
within layers c) Organization of the system into hierarchical layers with well-defined
responsibilities and interfaces d) Direct communication between all modules in the
system
40. In a layered architecture, a layer typically interacts with: a) Only layers above it b)
Only layers below it c) Primarily the layer immediately below it and potentially layers
above it d) Any layer in the system
Answer: c) Primarily the layer immediately below it and potentially layers above it
41. Function-oriented software design primarily focuses on: a) Objects and their
interactions b) Data structures and algorithms c) Decomposing the system into functions
or processes d) Events and state transitions
42. In function-oriented design, the system is viewed as a set of: a) Interacting objects b)
Sequential steps or procedures c) Data entities and relationships d) Events and responses
43. Data Flow Diagrams (DFDs) are a key modeling tool in: a) Object-oriented design b)
Function-oriented design c) Layered architecture d) Microservices architecture
44. DFDs primarily represent: a) The structure of data in the system b) The flow of data
between processes and data stores c) The relationships between entities d) The sequence
of operations in a process
46. A "data store" in a DFD represents: a) A process that transforms data b) A repository
for data at rest c) An external entity d) A data flow path
47. An "external entity" in a DFD represents: a) A process within the system b) A data
store within the system c) A source or sink of data outside the system boundary d) A data
flow path within the system
48. Structure charts are used in function-oriented design to represent: a) Data flow
within the system b) Hierarchical organization and control flow of modules c) Data
structures and relationships d) User interactions with the system
Answer: b) Hierarchical organization and control flow of modules
50. Function-oriented design is well-suited for systems where: a) Data structures are
complex and dynamic b) Functionality is clearly defined and data is relatively stable c)
Object interactions are the primary focus d) Event-driven processing is dominant
Answer: b) Process
54. In a DFD, an arrow typically represents a: a) Process b) External entity c) Data store
d) Data flow
55. Level 0 DFD (context diagram) shows: a) Detailed processes within the system b) The
system as a single process and its interactions with external entities c) Data stores within
the system d) Control flow between modules
Answer: b) The system as a single process and its interactions with external entities
56. Level 1 DFD decomposes: a) Data stores into smaller components b) External entities
into internal processes c) The context diagram's single process into major sub-processes
d) Data flows into control flows
Answer: c) The context diagram's single process into major sub-processes
57. Structure charts are read from: a) Left to right b) Right to left c) Top to bottom,
showing hierarchical relationships d) Bottom to top, showing data flow
59. In a structure chart, an arrow with an open circle at the tail represents: a) Data flow
b) Control flow c) Data parameter passed d) Control parameter passed (flag)
60. In a structure chart, an arrow with a filled circle at the tail represents: a) Control
flow b) Data parameter passed c) Control parameter passed (flag) d) Data store access
Microservices Architecture
Answer: b) Developing the system as a suite of small, independent, and loosely coupled
services
62. Key benefits of microservices architecture include: a) Tighter coupling and increased
complexity b) Improved scalability, resilience, technology diversity, and faster
deployment c) Reduced fault isolation and increased blast radius of failures d)
Centralized data management and monolithic database
63. Each microservice typically: a) Shares a common database with other microservices b)
Has its own independent database or data store c) Relies on shared memory for
communication d) Is deployed as a single monolithic unit
Answer: b) Isolate and package microservices with their dependencies for deployment
68. Microservices architecture is BEST suited for: a) Small, simple applications with
limited scalability needs b) Large, complex, and evolving applications requiring
scalability and resilience c) Batch processing systems with fixed functionalities d)
Embedded systems with resource constraints
70. "Fault isolation" in microservices means that: a) Faults in one microservice are
automatically fixed by other microservices b) Failures in one microservice are contained
and less likely to cascade to other services c) Microservices are designed to be
completely fault-tolerant and never fail d) Faults are detected and resolved during the
design phase itself
Answer: b) Failures in one microservice are contained and less likely to cascade to other
services
Layered Architecture
71. Layered architecture is also known as: a) Monolithic architecture b) N-tier architecture
c) Microkernel architecture d) Event-driven architecture
72. The primary goal of layered architecture is to: a) Improve performance by reducing
communication overhead b) Organize the system into distinct layers with specific
responsibilities to manage complexity c) Increase coupling between modules for better
integration d) Distribute functionalities across multiple services
Answer: b) Organize the system into distinct layers with specific responsibilities to
manage complexity
73. A typical layered architecture often includes layers like: a) Presentation, Business
Logic, Data Access, and Persistence b) Microservices, API Gateway, Service Registry c)
Kernel, Microkernel, and User-level services d) Event producers, Event bus, Event
consumers
74. The "Presentation layer" in layered architecture is responsible for: a) Data storage
and retrieval b) Implementing core business logic and rules c) Handling user interface
and user interactions d) Managing communication between layers
75. The "Business Logic layer" (or Application layer) is responsible for: a) Data storage
and persistence b) Implementing core business rules, logic, and workflows c) User
interface and presentation logic d) Managing network communication
76. The "Data Access layer" (or Persistence layer) is responsible for: a) User interface
and presentation b) Business logic processing c) Interacting with databases or data
storage systems d) Network communication and service discovery
77. In a strict layered architecture, a layer can only directly interact with: a) Any other
layer in the system b) Only the layer immediately above it c) Only the layer immediately
below it d) Layers above and below it, but not layers at the same level
Answer: c) Only the layer immediately below it
78. Benefits of layered architecture include: a) Increased coupling and reduced cohesion b)
Easier maintenance, testability, and understandability due to separation of concerns c)
Tighter integration and reduced modularity d) Reduced scalability and resilience
Serverless Computing
85. "Statelessness" of serverless functions means that: a) Functions cannot process data b)
Functions do not maintain state between invocations c) Functions are not reliable and
may fail frequently d) Functions are not secure
87. In a system with "stamp coupling," if the structure of the complex data being
passed between modules changes, what is the likely impact? a) Only the module
sending the data needs to be changed b) Only the module receiving the data needs to be
changed c) Both the sending and receiving modules, and potentially others using the
same data structure, may need to be changed d) No modules will be affected as stamp
coupling is a loose form of coupling
Answer: c) Both the sending and receiving modules, and potentially others using the
same data structure, may need to be changed
88. Consider a module with "logical cohesion." What is the MOST significant
drawback of such a module in terms of maintenance and reuse? a) It is difficult to
understand the module's interface b) It is hard to reuse the module for a specific purpose
as it performs multiple, loosely related functions c) It is prone to performance bottlenecks
due to its complexity d) It is difficult to test due to its large size
Answer: b) It is hard to reuse the module for a specific purpose as it performs multiple,
loosely related functions
Answer: b) Data consistency across services becomes more challenging and requires
strategies like eventual consistency
91. In serverless computing, "cold start" refers to: a) The initial deployment of serverless
functions b) The delay experienced when a serverless function is invoked for the first
time or after a period of inactivity c) The process of scaling down serverless functions
during periods of low demand d) The process of updating serverless function code
Answer: b) The delay experienced when a serverless function is invoked for the first
time or after a period of inactivity
92. Which of the following architectural styles is MOST suitable for building a complex
e-commerce platform requiring high scalability, resilience, and independent
deployments of different functionalities like product catalog, order processing, and
payment gateway? a) Monolithic architecture b) Layered architecture c) Microservices
architecture d) Function-oriented architecture
93. For a simple, internal utility application with well-defined functionalities and
minimal scalability requirements, which architecture might be a reasonable choice
to minimize development and operational overhead? a) Microservices architecture b)
Layered architecture c) Monolithic architecture d) Serverless architecture
Answer: c) Breaking down the system into sequential processes and data transformations
95. What is a potential disadvantage of using structure charts for designing large and
complex systems? a) They are not suitable for representing data flow b) They can
become very large and difficult to manage for complex systems c) They do not support
modular design principles d) They are primarily focused on object-oriented systems
Answer: b) They can become very large and difficult to manage for complex systems
Scenario-Based MCQs
Answer: b) Identify clear service boundaries based on business capabilities and domain
decomposition
98. A startup is building a new mobile backend using serverless computing. They expect
highly variable traffic patterns with occasional spikes. What is the MOST
significant advantage of serverless computing in this scenario? a) Lower upfront
infrastructure costs and automatic scaling based on demand b) Full control over server
infrastructure and operating system c) Easier management of stateful data within
serverless functions d) Reduced vendor lock-in compared to traditional cloud services
Answer: a) Lower upfront infrastructure costs and automatic scaling based on demand
99. A software module is responsible for validating user input, formatting data for
storage, and logging errors. Which type of cohesion does this module MOST likely
exhibit? a) Functional cohesion b) Sequential cohesion c) Logical cohesion d)
Coincidental cohesion
Answer: c) Logical cohesion (performing logically similar but functionally distinct tasks)
100. A system is designed with high coupling between modules. What is the
MOST likely long-term consequence for the system's evolution and maintenance? a)
Faster development and deployment of new features b) Easier to understand and modify
individual modules independently c) Increased complexity in making changes and higher
risk of introducing ripple effects and bugs d) Improved system performance due to
reduced communication overhead