1In software design, what is the primary goal of modularity?
Modularity
Easy
A.To use as many global variables as possible.
B.To write the entire software in a single, large file.
C.To ensure the software only runs on one specific operating system.
D.To divide a complex system into smaller, manageable, and independent parts called modules.
Correct Answer: To divide a complex system into smaller, manageable, and independent parts called modules.
Explanation:
Modularity is the design principle of breaking down a large software system into smaller, self-contained, and interchangeable components or modules. This makes the system easier to develop, understand, and maintain.
Incorrect! Try again.
2Which term describes the degree to which the elements inside a single module belong together and are focused on a single task?
Cohesion
Easy
A.Coupling
B.Abstraction
C.Cohesion
D.Encapsulation
Correct Answer: Cohesion
Explanation:
Cohesion is a measure of how strongly related and focused the responsibilities of a single software module are. High cohesion, where all elements work towards a common goal, is desirable.
Incorrect! Try again.
3In software design, what does 'coupling' refer to?
Coupling
Easy
A.The physical connection of hardware components.
B.The degree of interdependence between different software modules.
C.The strength of connections within a single module.
D.The process of compiling code.
Correct Answer: The degree of interdependence between different software modules.
Explanation:
Coupling measures the degree to which different modules rely on each other. A good design aims for low coupling, meaning modules are as independent as possible.
Incorrect! Try again.
4Which type of cohesion is considered the most desirable and strongest?
Types of cohesion and coupling
Easy
A.Temporal Cohesion
B.Coincidental Cohesion
C.Logical Cohesion
D.Functional Cohesion
Correct Answer: Functional Cohesion
Explanation:
Functional cohesion is the ideal type, where all elements of a module contribute to performing a single, well-defined function. This leads to modules that are highly focused and reusable.
Incorrect! Try again.
5Which type of coupling is generally considered the worst or most undesirable, where one module modifies the internal data of another?
Types of cohesion and coupling
Easy
A.Content Coupling
B.Data Coupling
C.Stamp Coupling
D.Control Coupling
Correct Answer: Content Coupling
Explanation:
Content coupling is the worst form because one module directly modifies or relies on the internal workings of another module. This violates information hiding and makes the system very difficult to maintain.
Incorrect! Try again.
6A software design is considered to have good module independence if its modules have:
Measuring module independence
Easy
A.Low cohesion and high coupling
B.Low cohesion and low coupling
C.High cohesion and high coupling
D.High cohesion and low coupling
Correct Answer: High cohesion and low coupling
Explanation:
Good module independence is achieved by maximizing the relationships within a module (high cohesion) and minimizing the relationships between modules (low coupling).
Incorrect! Try again.
7In a Data Flow Diagram (DFD), what does a circle or a rounded rectangle typically represent?
Function-oriented design: Data Flow Diagrams (DFD) - symbols, notations and leveling
Easy
A.A data store
B.A process
C.A data flow
D.An external entity
Correct Answer: A process
Explanation:
A circle (Gane & Sarson notation) or a rounded rectangle (Yourdon & DeMarco notation) represents a process that transforms incoming data flows into outgoing data flows.
Incorrect! Try again.
8What does an arrow represent in a Data Flow Diagram (DFD)?
Function-oriented design: Data Flow Diagrams (DFD) - symbols, notations and leveling
Easy
A.Data flow
B.Control flow
C.A database
D.A user
Correct Answer: Data flow
Explanation:
An arrow in a DFD represents the movement of data between processes, data stores, and external entities. It is always labeled with the name of the data being transferred.
Incorrect! Try again.
9What is a Level 0 DFD also known as?
Context diagrams and decomposition and Rules for constructing DFDs
Easy
A.A Context Diagram
B.A Flowchart
C.A Structure Chart
D.A Class Diagram
Correct Answer: A Context Diagram
Explanation:
The Level 0 DFD, also called the Context Diagram, provides the highest-level view of the system, showing the entire system as a single process with its inputs from and outputs to external entities.
Incorrect! Try again.
10What is the primary purpose of a Structure Chart?
Structure Charts - components and notation
Easy
A.To detail the step-by-step logic of an algorithm.
B.To illustrate the module hierarchy and control flow between modules.
C.To describe the database schema.
D.To show the flow of data through a system.
Correct Answer: To illustrate the module hierarchy and control flow between modules.
Explanation:
A Structure Chart is a design tool that graphically represents the hierarchical organization of modules in a system, showing how they are structured and the passing of control and data between them.
Incorrect! Try again.
11The design principle of hiding the implementation details of a module from other parts of the system is known as:
Basic principles of software design
Easy
A.Information Hiding
B.Refinement
C.Abstraction
D.Modularity
Correct Answer: Information Hiding
Explanation:
Information Hiding is a core design principle where the internal details of a module's implementation are hidden from other modules, which only interact with it through a well-defined public interface.
Incorrect! Try again.
12In a DFD, what is represented by two parallel lines or an open-ended rectangle?
Function-oriented design: Data Flow Diagrams (DFD) - symbols, notations and leveling
Easy
A.A Process
B.An External Entity
C.A Data Flow
D.A Data Store
Correct Answer: A Data Store
Explanation:
A Data Store (like a file or database table) is represented by two parallel lines or an open-ended rectangle. It is a passive repository of data where data can be stored and retrieved.
Incorrect! Try again.
13The process of breaking down a high-level DFD process into a more detailed, lower-level DFD is called:
Context diagrams and decomposition and Rules for constructing DFDs
Easy
A.Decomposition or Leveling
B.Aggregation
C.Generalization
D.Compilation
Correct Answer: Decomposition or Leveling
Explanation:
Decomposition (also known as leveling or refinement) is the process of exploding a single process in a DFD into a more detailed DFD to show its internal sub-processes and data flows.
Incorrect! Try again.
14A common design trade-off in software engineering involves balancing performance with which other quality attribute?
Design trade-offs
Easy
A.Compilation speed
B.Maintainability
C.Programming language choice
D.Number of code files
Correct Answer: Maintainability
Explanation:
A classic design trade-off is between performance and maintainability. Highly optimized code for performance can sometimes be more complex and harder to understand, modify, and maintain.
Incorrect! Try again.
15In a Structure Chart, what does a small arrow with an empty circle at its tail represent?
Structure Charts - components and notation
Easy
A.A data couple
B.A control couple
C.A module call
D.A conditional call
Correct Answer: A data couple
Explanation:
A small arrow with an empty circle is a 'data couple', representing the passing of a simple data parameter from a calling module to a called module.
Incorrect! Try again.
16What is the primary purpose of a Software Design Document (SDD)?
Design documentation and design review techniques
Easy
A.To provide the complete source code of the application.
B.To list all the bugs found during testing.
C.To describe the system's architecture, components, interfaces, and data for developers.
D.To serve as a user manual for the end-users.
Correct Answer: To describe the system's architecture, components, interfaces, and data for developers.
Explanation:
The Software Design Document (SDD) is a comprehensive description of the software's design. It acts as a blueprint for the development team to follow during the implementation phase.
Incorrect! Try again.
17Which of the following is a common, informal technique for reviewing a software design document?
Design documentation and design review techniques
Easy
A.Beta Testing
B.Unit Testing
C.Design Walkthrough
D.Code Compilation
Correct Answer: Design Walkthrough
Explanation:
A design walkthrough is a review process where the designer presents the design document to a group of peers, managers, and stakeholders to find errors and get feedback before implementation begins.
Incorrect! Try again.
18According to the rules of DFD construction, which of the following connections is generally considered illegal?
Context diagrams and decomposition and Rules for constructing DFDs
Easy
A.A data flow directly between two external entities.
B.A data flow from a data store to a process.
C.A data flow from a process to a data store.
D.A data flow from an entity to a process.
Correct Answer: A data flow directly between two external entities.
Explanation:
Data cannot flow directly from one external entity to another without passing through a process within the system. The DFD models how the system being analyzed processes data, not how external entities interact with each other.
Incorrect! Try again.
19Transform Analysis is a design strategy used to convert a DFD into what?
Module hierarchy and control flow and Transform and transaction analysis
Easy
A.A structure chart
B.Source code
C.A flowchart
D.A database schema
Correct Answer: A structure chart
Explanation:
Transform Analysis is a key technique in function-oriented design for deriving a structure chart from a data flow diagram. It identifies the central data processing and maps the DFD into a hierarchical module structure.
Incorrect! Try again.
20In a structure chart, what does a diamond symbol at the base of a module call represent?
Structure Charts - components and notation
Easy
A.A loop (iteration).
B.A recursive call.
C.A conditional call (selection).
D.A data-only module.
Correct Answer: A conditional call (selection).
Explanation:
A diamond symbol indicates that the call to the subordinate module is conditional. It is executed only if a certain condition is met, representing an 'if' or 'case' statement in the code.
Incorrect! Try again.
21A module named ProcessStudentData performs the following tasks in order: 1) It retrieves student records from a data store. 2) It calculates the GPA for each student. 3) It generates a formatted report with the calculated GPAs. The output of each step is the input for the next. Which type of cohesion does this module most accurately exhibit?
Types of cohesion and coupling
Medium
A.Temporal Cohesion
B.Sequential Cohesion
C.Communicational Cohesion
D.Functional Cohesion
Correct Answer: Sequential Cohesion
Explanation:
Sequential cohesion occurs when the output of one element in a module serves as the input for another element. In this scenario, the retrieved records (step 1) are the input for the GPA calculation (step 2), and the calculated GPAs (step 2) are the input for report generation (step 3). This chained relationship is the definition of sequential cohesion.
Incorrect! Try again.
22A system design involves multiple modules (Authentication, UserProfile, OrderProcessing) that all read and write to a shared global data structure holding the current user's session information. What is the primary design flaw associated with this approach?
Coupling
Medium
A.It exemplifies stamp coupling because a complex data structure is used.
B.It creates high common coupling, making modules interdependent and difficult to maintain.
C.It improves performance by avoiding parameter passing, which is a good trade-off.
D.It increases the logical cohesion of the system as a whole.
Correct Answer: It creates high common coupling, making modules interdependent and difficult to maintain.
Explanation:
Common coupling occurs when two or more modules share access to the same global data. This is a highly undesirable form of coupling because a change in the global data structure can require changes in all modules that use it. It also makes it difficult to understand which module is responsible for modifying the data, leading to maintenance and debugging challenges.
Incorrect! Try again.
23A DFD for an online ordering system shows a data flow labeled Payment_Details moving directly from the Customer external entity to a Credit_Card_Transactions data store. What fundamental DFD rule does this violate?
Function-oriented design: Data Flow Diagrams (DFD) - symbols, notations and leveling
Medium
A.Data stores cannot be duplicated in a DFD.
B.A process must have at least one input and one output data flow.
C.Data cannot flow directly between two data stores.
D.Data cannot flow directly from an external entity to a data store.
Correct Answer: Data cannot flow directly from an external entity to a data store.
Explanation:
A core rule of DFDs is that all data must pass through a process. An external entity cannot directly write to or read from a data store. There must be an intermediary process (e.g., Process Payment) that takes the data from the entity and performs the action of storing it.
Incorrect! Try again.
24In a Structure Chart, a diamond symbol is drawn at the base of a superordinate module A, with an arrow pointing from the diamond to a subordinate module B. What does this notation represent?
Structure Charts - components and notation
Medium
A.Module A and B are asynchronously coupled.
B.Module A makes a conditional call to module B based on a decision.
C.Module B is a reusable library function called by module A.
D.Module A iteratively calls module B in a loop.
Correct Answer: Module A makes a conditional call to module B based on a decision.
Explanation:
The diamond symbol in a Structure Chart represents a decision. It indicates that the superordinate module contains logic (like an if-then-else statement) that determines whether the subordinate module will be invoked.
Incorrect! Try again.
25A development team decides to implement a microservices architecture for a new e-commerce platform. While this choice enhances scalability and independent deployment, it significantly increases the complexity of network communication, service discovery, and data consistency management. This decision is a classic example of trading off...
Design trade-offs
Medium
A.Modularity and scalability for operational simplicity.
B.Development speed for runtime performance.
C.Performance for security.
D.Usability for maintainability.
Correct Answer: Modularity and scalability for operational simplicity.
Explanation:
Microservices architecture provides high modularity (independent services) and scalability. However, managing a distributed system is inherently more complex than managing a monolith. The team is accepting this increased operational and deployment complexity to gain the benefits of a more scalable and maintainable modular architecture.
Incorrect! Try again.
26A Level-0 DFD for a University_Registration_System shows two inputs from the Student entity: Course_Selection and Personal_Details, and one output to the Student entity: Registration_Confirmation. When this system is decomposed into a Level-1 DFD, which of the following must be true to maintain balance?
Context diagrams and decomposition and Rules for constructing DFDs
Medium
A.The Level-1 DFD must introduce a new external entity, such as Professor.
B.All processes within the Level-1 DFD must connect to a central Student_DB data store.
C.The net sum of all data flows entering and leaving the boundary of the Level-1 DFD must be Course_Selection, Personal_Details, and Registration_Confirmation.
D.The Level-1 DFD must contain exactly three processes, one for each data flow.
Correct Answer: The net sum of all data flows entering and leaving the boundary of the Level-1 DFD must be Course_Selection, Personal_Details, and Registration_Confirmation.
Explanation:
The principle of DFD balancing dictates that the inputs and outputs of a parent process in a higher-level diagram must be conserved in the corresponding lower-level diagram. The Level-1 DFD is an explosion of the single process in the Level-0 DFD, so its overall inputs and outputs must match those of the parent process exactly.
Incorrect! Try again.
27A system's DFD shows an incoming data stream User_Command that flows into a process called Dispatch_Command. Based on the command type (e.g., 'ADD', 'UPDATE', 'DELETE'), this process activates one of three different downstream data flow paths. Which design strategy is most appropriate for converting this DFD into a structure chart?
Module hierarchy and control flow and Transform and transaction analysis
Medium
A.Data Structure-Oriented Design
B.Transaction Analysis
C.Object-Oriented Design
D.Transform Analysis
Correct Answer: Transaction Analysis
Explanation:
Transaction analysis is ideal for designing systems where a single input triggers one of many possible action paths. The DFD described has a characteristic 'transaction center' (Dispatch_Command) that routes control to different processing 'spokes'. This structure is the hallmark of a system suitable for transaction analysis.
Incorrect! Try again.
28Module independence is a key indicator of a good software design. It is achieved by having...
Measuring module independence
Medium
A.High cohesion and high coupling.
B.Low cohesion and high coupling.
C.Low cohesion and low coupling.
D.High cohesion and low coupling.
Correct Answer: High cohesion and low coupling.
Explanation:
A well-designed module should have a single, well-defined purpose (high cohesion) and minimal dependencies on other modules (low coupling). This combination makes modules easier to understand, test, reuse, and maintain independently of the rest of the system.
Incorrect! Try again.
29Module A calls Module B and passes it a reference to a large Employee object. Module B only uses the employee_ID field from the object to perform a database lookup. This is a classic example of which type of coupling?
Types of cohesion and coupling
Medium
A.Control Coupling
B.Data Coupling
C.Stamp Coupling
D.Content Coupling
Correct Answer: Stamp Coupling
Explanation:
Stamp coupling occurs when a module is passed a data structure (like an object or record) but only uses a portion of it. This is less desirable than data coupling (passing only the necessary simple data items) because it creates a dependency on the entire data structure, even the unused parts. A change to an unused field in the Employee object could still necessitate recompilation or retesting of Module B.
Incorrect! Try again.
30During a design review meeting, the author of the design document leads a group of peers through the document, explaining the logic and flow, while the peers ask questions and look for errors and ambiguities. The atmosphere is collaborative and focused on improving the design, not on formally approving it. Which technique does this best describe?
Design documentation and design review techniques
Medium
A.A management review
B.A formal inspection
C.An audit
D.A design walkthrough
Correct Answer: A design walkthrough
Explanation:
A walkthrough is a peer-group review where the author presents the work product (in this case, a design). It is typically less formal than an inspection and its primary goals are to find defects, consider alternatives, and educate the participants. The scenario described perfectly matches the nature of a walkthrough.
Incorrect! Try again.
31A software company is developing a large ERP system. By designing the system as a set of modules (e.g., HR, Finance, Inventory), different teams can work on different modules simultaneously. Which key advantage of modularity does this practice directly leverage?
Modularity
Medium
A.Improved algorithmic efficiency
B.Parallel development
C.Reduced runtime complexity
D.Guaranteed information hiding
Correct Answer: Parallel development
Explanation:
Modularity enables the breakdown of a large problem into smaller, manageable, and independent sub-problems (modules). Once the interfaces between these modules are defined, development teams can work on them in parallel, significantly reducing the overall development time for the project.
Incorrect! Try again.
32A utility module contains several functions: one to initialize the system log, one to close database connections, and one to write shutdown metrics. These functions are grouped together because they all need to be executed at system shutdown. This module exhibits which type of cohesion?
Types of cohesion and coupling
Medium
A.Sequential Cohesion
B.Functional Cohesion
C.Logical Cohesion
D.Temporal Cohesion
Correct Answer: Temporal Cohesion
Explanation:
Temporal cohesion is when elements of a module are grouped together because they are processed at a particular time in the execution of the system. In this case, all the functions are related by the fact that they are performed during the shutdown sequence.
Incorrect! Try again.
33In the context of transform analysis, the part of the DFD that handles incoming data, validates it, and converts it into a format suitable for the main processing is known as the...
Module hierarchy and control flow and Transform and transaction analysis
Medium
A.Efferent stream
B.Central transform
C.Afferent stream
D.Transaction center
Correct Answer: Afferent stream
Explanation:
The afferent stream (or input stream) is the part of the data flow that leads into the central processing region. Its corresponding modules in the structure chart are responsible for reading, validating, and preparing input data. The central transform is the core processing, and the efferent stream handles the output.
Incorrect! Try again.
34A DFD shows a process Generate_Report with no data inflows, but it has one data outflow called Final_Report going to an external entity. What is the common name for this error in DFD modeling?
Rules for constructing DFDs
Medium
A.Spontaneous Generation
B.Miracle
C.Data Sink
D.Black Hole
Correct Answer: Miracle
Explanation:
A 'miracle' is a process that produces output data without any input. This is a logical error because a process must transform data from some input source to create an output. The opposite error, a process with inputs but no outputs, is called a 'black hole'.
Incorrect! Try again.
35A designer chooses to create a generic, highly configurable DataParser module that can handle XML, JSON, and CSV formats. This makes the module very reusable. However, the internal logic of the module is now extremely complex due to the need to handle all formats. This decision prioritizes...
Design trade-offs
Medium
A.Reusability over simplicity and maintainability.
B.Simplicity over functionality.
C.Security over performance.
D.Performance over reusability.
Correct Answer: Reusability over simplicity and maintainability.
Explanation:
The designer is making a trade-off. By adding functionality to support multiple formats, the module becomes highly reusable across different projects or parts of the same project. The cost of this reusability is increased internal complexity, which can make the module harder to understand, debug, and maintain.
Incorrect! Try again.
36Which software design principle advocates for separating the user interface from the application logic, ensuring that changes to the UI will have minimal impact on the underlying business rules and data processing?
Basic principles of software design
Medium
A.Separation of Concerns (SoC)
B.Principle of Least Astonishment (POLA)
C.Information Hiding
D.Don't Repeat Yourself (DRY)
Correct Answer: Separation of Concerns (SoC)
Explanation:
Separation of Concerns is a design principle for separating a computer program into distinct sections such that each section addresses a separate concern. Separating the user interface (presentation concern) from the business logic (domain concern) is a prime example of SoC, and it is the foundational idea behind architectures like Model-View-Controller (MVC).
Incorrect! Try again.
37Module X calls module Y. Based on a result from Y, module X then decides whether to call module Z or module W. How does this control logic affect the coupling between modules X, Y, Z, and W?
Types of cohesion and coupling
Medium
A.It creates control coupling between X and Y.
B.It is an example of data coupling, as Y returns data to X.
C.It creates content coupling between X and the other modules.
D.It creates control coupling between X and modules Z and W.
Correct Answer: It is an example of data coupling, as Y returns data to X.
Explanation:
Module Y returns a data value to X. Module X uses this data to make its own decision. X is not passing a flag to Y, Z, or W to tell them how to behave. Therefore, the coupling between X and Y is data coupling. The relationship between X and Z/W is normal invocation; X is in control. Control coupling would exist if X passed a flag to another module telling it what to do internally.
Incorrect! Try again.
38Which of the following elements is most characteristic of a detailed design document rather than an architectural design document?
Design documentation and design review techniques
Medium
A.A breakdown of the system into its major components or subsystems.
B.The data structures and algorithms to be used within a specific module.
C.The choice of architectural pattern, such as layered or client-server.
D.The protocols for communication between major subsystems.
Correct Answer: The data structures and algorithms to be used within a specific module.
Explanation:
Architectural design focuses on the high-level structure, components, and their interactions. Detailed design delves into the internal logic of individual modules. Therefore, specifying the exact data structures and algorithms for a module is a core activity of detailed design, not architectural design.
Incorrect! Try again.
39Which of the following lists represents the general hierarchy of cohesion types, from most desirable (strongest) to least desirable (weakest)?
The accepted order of cohesion from best (strongest) to worst (weakest) is: Functional (performs one single task), Sequential (output of one part is input to another), Communicational (parts operate on the same data), Procedural (parts related by order of execution, not in the list), Temporal (parts related by time), Logical (parts logically related), and Coincidental (parts are unrelated).
Incorrect! Try again.
40In a structure chart, an arrow with an open circle at its tail is shown going from subordinate module B up to superordinate module A. What does this notation signify?
Structure Charts - components and notation
Medium
A.Module B is a data source.
B.Module B returns a data parameter to Module A.
C.The invocation of Module B by Module A is optional.
D.Module A passes a control flag to Module B.
Correct Answer: Module B returns a data parameter to Module A.
Explanation:
In structure chart notation, an arrow represents a call or invocation. Small arrows alongside the main arrow represent the flow of parameters. An arrow with an open circle (a 'data couple') indicates the flow of data. When it points from the subordinate (B) to the superordinate (A), it means B is returning data to A.
Incorrect! Try again.
41A development team is designing a ReportGenerator module. To achieve high cohesion, they place all functions related to report creation (e.g., generateHeader, generateBody, fetchData, formatData, saveToFile) into this single module. However, fetchData and formatData are also needed by a separate DataAnalytics module. To avoid code duplication, the DataAnalytics module now calls these two functions within the ReportGenerator module. What is the most significant design trade-off that has occurred?
Design trade-offs
Hard
A.Logical cohesion in ReportGenerator has been unintentionally created, weakening its initial design.
B.A shift from Stamp to Content coupling has occurred between the two modules.
C.The pursuit of high cohesion within ReportGenerator has led to undesirable Control coupling with DataAnalytics.
D.The effort to achieve high cohesion and avoid duplication has introduced high functional coupling (specifically, Stamp or Data coupling) for functions that could have been in a separate utility module.
Correct Answer: The effort to achieve high cohesion and avoid duplication has introduced high functional coupling (specifically, Stamp or Data coupling) for functions that could have been in a separate utility module.
Explanation:
This is a classic design trade-off. The initial goal was high cohesion for the ReportGenerator module. However, by including generic data-handling functions (fetchData, formatData), the module's cohesion is likely Communicational or Sequential, not purely Functional. When the DataAnalytics module calls these specific functions, it creates a dependency. The best solution would be to extract fetchData and formatData into a third, independent DataUtility module, which both ReportGenerator and DataAnalytics can use. This creates a more flexible design with lower coupling between the primary modules. The original design forced an unnecessary dependency (high coupling) between two otherwise unrelated high-level modules in a misguided attempt to maximize cohesion in one of them.
Incorrect! Try again.
42Consider a design metric for module instability, , defined as , where (efferent coupling) is the number of modules this module depends on (fan-out), and (afferent coupling) is the number of modules that depend on it (fan-in). A module is considered stable if is close to 0 and unstable if close to 1. In a layered architecture, which scenario represents the most severe design flaw?
Measuring module independence
Hard
A.A module in the UI layer has .
B.A core domain logic module has .
C.A core domain logic module has .
D.A database utility module has .
Correct Answer: A core domain logic module has .
Explanation:
Instability () means a module has high fan-out and low fan-in, implying it depends on many other modules but few depend on it. This is expected for UI layer modules, as they depend on business logic and services but are rarely depended upon. Instability close to 0 () means low fan-out and high fan-in, indicating a stable, responsible module. This is ideal for a database utility, which many modules depend on but should depend on very little itself. A core domain logic module should be highly stable () because it contains fundamental business rules and should not be dependent on higher-level or volatile components. A core module with signifies it is highly dependent on other modules, making it fragile and hard to change, which is a major architectural flaw (violates the Dependency Inversion Principle).
Incorrect! Try again.
43A module ProcessOrder is defined with the following sequential operations: 1. It receives a complex CustomerOrder object. 2. It calls validateOrder(CustomerOrder) which uses only the orderID and items fields. 3. It then calls checkInventory(CustomerOrder) which uses only the items field. 4. It then accesses a global SystemConfig object to get the taxRate. 5. Finally, it calculates the total and updates a FinancialLedger object, which is also a global variable. Which pair of coupling and cohesion types represents the most significant design problem in this module?
Types of cohesion and coupling
Hard
A.Data Coupling and Sequential Cohesion
B.Common Coupling and Communicational Cohesion
C.Common Coupling and Temporal Cohesion
D.Stamp Coupling and Procedural Cohesion
Correct Answer: Common Coupling and Communicational Cohesion
Explanation:
Let's analyze the issues. Passing the entire CustomerOrder object when only parts are needed is Stamp Coupling. The operations being performed in sequence on the same data (CustomerOrder) suggests Communicational Cohesion. The access to global variables SystemConfig and FinancialLedger is Common Coupling. Of these, Common Coupling is considered one of the worst forms of coupling because it creates hidden, system-wide dependencies that are difficult to track and maintain. While Stamp Coupling is not ideal, it is less severe than Common Coupling. The cohesion is Communicational because the operations are grouped as they operate on the same data (CustomerOrder), not just because they occur in a sequence (which would be Sequential). The combination of tight, non-obvious Common Coupling with a moderately acceptable cohesion level makes this the most significant problem set.
Incorrect! Try again.
44You are given a DFD for a command processing system. The central part of the DFD shows a single process, Parse Command, which receives a User Command data flow. Based on the command type (e.g., 'add', 'delete', 'query'), Parse Command routes a formatted request to one of three separate downstream processes: Add Record, Delete Record, or Query Database. This entire segment is identified as a transaction center. However, the Query Database process itself is complex: it receives the formatted query, transforms it into an SQL query, executes it, receives raw results, formats the results into a report, and outputs the report. How should a structure chart for this system be designed?
Transform and transaction analysis
Hard
A.A single, large transaction-driven structure with the main controller calling Parse Command, which then directly calls the sub-functions for add, delete, and query.
B.A hybrid structure: The top level is a transaction-driven hierarchy with a dispatcher module for commands, but the branch for the 'query' command becomes the root of a transform-driven sub-hierarchy.
C.Two separate structure charts: one for the transaction processing of add/delete, and another for the transform flow of the query functionality.
D.A purely transform-driven structure, where User Command is the afferent flow and the final report is the efferent flow, ignoring the transaction-like nature.
Correct Answer: A hybrid structure: The top level is a transaction-driven hierarchy with a dispatcher module for commands, but the branch for the 'query' command becomes the root of a transform-driven sub-hierarchy.
Explanation:
This scenario deliberately mixes transaction and transform flow characteristics. The Parse Command process is a classic transaction center, identifying the type of incoming data and dispatching it along one of several paths. This suggests a transaction-driven design for the top level of the structure chart. However, the Query Database process is a clear example of a transform flow with a central transform (transforming SQL query to raw results). Therefore, the most effective design is a hybrid approach. The main module would manage the transaction center, and one of its subordinate modules (the one handling the query) would act as the controller for a smaller, self-contained transform-centered structure. This correctly models the problem's architecture.
Incorrect! Try again.
45A Level 1 DFD for a system contains Process 1.0, Process 2.0, an external entity 'User', and a data store 'Inventory'. A data flow 'Item Details' goes from 'Inventory' to Process 1.0. Another data flow, 'Updated Stock Count', goes from Process 2.0 to 'Inventory'. The decomposition of Process 1.0 into a Level 2 DFD shows two sub-processes, 1.1 and 1.2. In this Level 2 DFD, a new data flow 'Low Stock Alert' is shown going from Process 1.1 to the 'User' external entity. Based on DFD leveling rules, what is the primary error?
Rules for constructing DFDs
Hard
A.The 'Inventory' data store should not be visible at both Level 1 and Level 2.
B.The data flow 'Low Stock Alert' violates the principle of balancing, as it appears at Level 2 without a corresponding parent flow at Level 1.
C.A process ('Low Stock Alert' source) cannot directly communicate with an external entity in a leveled DFD.
D.Process 1.1 cannot create a new data flow; all flows must originate from its parent, Process 1.0.
Correct Answer: The data flow 'Low Stock Alert' violates the principle of balancing, as it appears at Level 2 without a corresponding parent flow at Level 1.
Explanation:
The principle of DFD balancing (or consistency) is critical. It states that all data flows going into or out of a parent process must be represented as flows going into or out of the boundary of its child diagram. In this scenario, the 'Low Stock Alert' flow emerges from within the decomposition of Process 1.0 (specifically, from 1.1) and goes to an external entity that was present at the parent level. However, this output flow did not exist for Process 1.0 at Level 1. This is a direct violation of balancing. For the DFD to be correct, the Level 1 diagram must also show a 'Low Stock Alert' data flow originating from Process 1.0 and terminating at the 'User' entity.
Incorrect! Try again.
46A team is developing a safety-critical avionics system. The design is complex and has zero tolerance for ambiguity or error. The design document is dense, formal, and over 500 pages long. The review team consists of domain experts who are geographically distributed. Which design review technique is most appropriate and why?
Design documentation and design review techniques
Hard
A.An ad-hoc review, where experts review the document on their own time to maximize efficiency and accommodate different time zones.
B.A formal design inspection, because its structured process with defined roles (Moderator, Reader, Scribe) and phases (Preparation, Meeting, Follow-up) is essential for rigorous, evidence-based defect detection in a critical system.
C.Pair designing, where two engineers review and modify the design together in real-time, as this is the quickest way to find deep logical errors.
D.A design walkthrough, because its informal nature encourages collaborative problem-solving and brainstorming among the distributed experts.
Correct Answer: A formal design inspection, because its structured process with defined roles (Moderator, Reader, Scribe) and phases (Preparation, Meeting, Follow-up) is essential for rigorous, evidence-based defect detection in a critical system.
Explanation:
For a safety-critical system, rigor and process are paramount. A formal inspection is the most systematic and rigorous technique. It mandates individual preparation (where experts can study the dense document beforehand), a structured meeting focused solely on defect logging (not problem-solving), and a formal follow-up process to ensure defects are fixed. This structured approach is superior to the informal nature of walkthroughs or ad-hoc reviews, which might miss critical, subtle errors. While pair designing is effective, it's a design creation/refinement technique, not a formal review method suitable for a large, completed document with a distributed team of experts.
Incorrect! Try again.
47A structure chart shows that a high-level module A calls module B. A passes a flag named computation_mode to B. Inside B, an if statement checks this flag and executes one of two completely different algorithms, both of which calculate a result and return it to A. Which statement provides the most accurate and critical analysis of this design?
Module hierarchy and control flow
Hard
A.The design is flawed due to Pathological Coupling, as A is directly modifying the execution path within B.
B.This represents excellent design, as module B is highly cohesive (Functional Cohesion) by performing a single, well-defined conceptual task: 'compute result'.
C.This design exhibits high Control Coupling, which is problematic because module A must know about the internal logic of module B, and B has low, Logical Cohesion.
D.This is an example of Stamp Coupling because a control flag is part of a larger data structure passed from A to B.
Correct Answer: This design exhibits high Control Coupling, which is problematic because module A must know about the internal logic of module B, and B has low, Logical Cohesion.
Explanation:
Passing a flag that dictates the logic to be executed within another module is the definition of Control Coupling. This is undesirable because the calling module (A) is implicitly tied to the internal implementation details of the called module (B). Furthermore, module B is not functionally cohesive. It performs two different algorithms, and they are grouped together simply because they fall under the logical category of 'computation'. This is the definition of Logical Cohesion, which is a weak form of cohesion. The combination of high Control Coupling and low Logical Cohesion makes the module B difficult to understand, maintain, and reuse independently.
Incorrect! Try again.
48A module named ProcessStudentData contains the following functions in order: readStudentInfo(), validateStudentInfo(), calculateGPA(), and generateTranscript(). The output of readStudentInfo() (student record) is the input to validateStudentInfo(). The validated student record is then used by calculateGPA(), and the output of calculateGPA() (the GPA value) is added to the student record which is then used by generateTranscript(). What is the highest level of cohesion this module exhibits?
Cohesion
Hard
A.Sequential Cohesion
B.Functional Cohesion
C.Procedural Cohesion
D.Communicational Cohesion
Correct Answer: Sequential Cohesion
Explanation:
This is a subtle but important distinction. The elements of the module are executed in a specific order, and the output of one element serves as the input for the next. This is the definition of Sequential Cohesion. It is not Communicational Cohesion because, while the functions do operate on the same data structure (the student record), the defining characteristic is their assembly-line, sequential dependency. It's not Procedural Cohesion because the order is dictated by data flow, not just by a required order of execution of otherwise unrelated tasks. It is not Functional Cohesion because the module performs multiple distinct functions (validate, calculate, generate) rather than a single, indivisible one.
Incorrect! Try again.
49Module A updates a status record in a shared database. Module B, which runs periodically, reads this status record. If the status is 'Complete', Module B triggers a cleanup process. This interaction is mediated entirely through the database record; the modules do not call each other directly. What is the most precise classification of the coupling between A and B?
Coupling
Hard
A.This is a combination of Common Coupling (due to the shared database) and Control Coupling (as the status value directs B's logic).
B.This is Stamp Coupling because the entire status record is read, even if only one field is used to make the decision.
C.This is Content Coupling because B's logic depends on data written by A.
D.This is Data Coupling because they only communicate through data.
Correct Answer: This is a combination of Common Coupling (due to the shared database) and Control Coupling (as the status value directs B's logic).
Explanation:
The use of a shared resource (the database) that both modules can read and write to is the definition of Common Coupling. This is the primary mechanism of their interaction. However, the data being passed is not just raw data; the 'status' field acts as a flag that explicitly controls the behavior of Module B. Module A is effectively telling Module B 'what to do' by setting the flag. This is the essence of Control Coupling. Therefore, the most precise and critical description is that this design exhibits both Common and Control coupling, which are both considered undesirable forms of coupling.
Incorrect! Try again.
50A Level 0 (Context) DFD shows one process, 'System', and two external entities, 'Manager' and 'Employee'. The diagram shows a data flow 'Timesheet Data' from 'Employee' to 'System' and a data flow 'Payroll Report' from 'System' to 'Manager'. The Level 1 DFD, which decomposes 'System', shows three processes. It correctly shows 'Timesheet Data' entering the diagram boundary and 'Payroll Report' exiting. However, inside the Level 1 diagram, there is also a data flow named 'Error Log' that goes from a process to a new data store 'System Errors', which was not shown on the context diagram. Analyze this situation.
Context diagrams and decomposition and Rules for constructing DFDs
Hard
A.The Level 1 DFD is correct, but only if the 'System Errors' data store is also shown on the context diagram, interacting with the 'System' process.
B.The Level 1 DFD is incorrect because the 'Error Log' flow violates balancing, as it does not cross the parent process boundary.
C.The Level 1 DFD is incorrect because a data store cannot be introduced at this level; it must be shown at the context level.
D.The Level 1 DFD is correct. Data stores that are internal to the system are not shown on the context diagram and can be introduced at any level of decomposition.
Correct Answer: The Level 1 DFD is correct. Data stores that are internal to the system are not shown on the context diagram and can be introduced at any level of decomposition.
Explanation:
This question tests a nuanced rule of DFD leveling. The context diagram (Level 0) is meant to show the system as a black box, detailing only its interactions (data flows) with external entities. Internal data stores are implementation details of the system itself. Therefore, they are deliberately hidden at Level 0. It is perfectly valid and standard practice to introduce internal data stores at Level 1 or lower levels of decomposition. The principle of balancing applies to data flows that cross the system boundary (i.e., flows to/from external entities), not to purely internal flows and data stores. Therefore, the described Level 1 DFD is correct.
Incorrect! Try again.
51A developer writes the following line of code in a method within the UIController class: customer.getAccount().getProfile().setPrimaryEmail(newEmail). This code directly chains multiple method calls to navigate through objects and finally modify a state. This is a direct violation of which design principle, and what is its primary negative consequence?
Modularity
Hard
A.The Open-Closed Principle; its consequence is that adding new profile fields requires modifying the controller.
B.The Single Responsibility Principle; its consequence is low cohesion in the UIController.
C.The Law of Demeter (Principle of Least Knowledge); its consequence is high coupling between the UIController and the internal structure of the Account and Profile classes.
D.The Liskov Substitution Principle; its consequence is that subtypes of Account might behave unexpectedly.
Correct Answer: The Law of Demeter (Principle of Least Knowledge); its consequence is high coupling between the UIController and the internal structure of the Account and Profile classes.
Explanation:
The Law of Demeter states that a module should not have knowledge of the internal workings of the objects it manipulates. A method should only call methods of: itself, its parameters, any objects it creates/instantiates, or its direct component objects. The code customer.getAccount().getProfile().setPrimaryEmail() violates this by 'reaching through' customer to account, and through account to profile. This creates a strong structural dependency (high coupling) from UIController not just to the Customer class, but also to the Account and Profile classes. If the internal structure of Account or Profile changes (e.g., getProfile() is renamed), the UIController code will break, demonstrating the ripple effect caused by this tight coupling.
Incorrect! Try again.
52During transform analysis, the process of 'first-level factoring' in creating a structure chart from a DFD involves what specific steps?
Transform and transaction analysis
Hard
A.Identifying the central transform and creating a main module, then subordinate input, transform, and output modules that directly mirror the DFD processes.
B.Decomposing the DFD into Level 2, then creating a structure chart module for each Level 2 process.
C.Creating a main coordinating module, and then creating one subordinate module for each data flow on the DFD, representing data transformation.
D.Identifying all external entities and creating corresponding controller modules in the structure chart.
Correct Answer: Identifying the central transform and creating a main module, then subordinate input, transform, and output modules that directly mirror the DFD processes.
Explanation:
First-level factoring is a specific step in converting a DFD to a structure chart using transform analysis. It involves: 1) Identifying the main afferent (input) and efferent (output) streams in the DFD. 2) Locating the central transform, which is the set of processes that converts the most abstract input into the most abstract output. 3) Creating a top-level coordinating module (the 'main' module). 4) Creating subordinate 'controller' modules for the afferent, efferent, and central transform regions. 5) Populating the modules below these controllers by mapping each DFD process to a module in the structure chart. The key is creating the high-level structure based on the input-process-output flow around the central transform.
Incorrect! Try again.
53Module A is a generic XMLParser utility. 25 other modules in the system use it. The XMLParser itself depends on one system library for file I/O. Module B is a BillingReportGenerator. It is used by only one module (the AdminUI). The BillingReportGenerator depends on 8 other modules (DBConnector, CustomerModel, InvoiceCalculator, PDFWriter, etc.). Using the instability metric (), which module is considered more 'responsible' and stable within the architecture?
Measuring module independence
Hard
A.Module B, because its instability is high, indicating it is a volatile component.
B.Neither, as both have a Fan-out greater than 0, making them inherently unstable.
C.Module B, because its low Fan-in (1) means changes to it will have a small ripple effect across the system.
D.Module A, because its instability is very low, indicating it is a stable component that many others rely upon.
Correct Answer: Module A, because its instability is very low, indicating it is a stable component that many others rely upon.
Explanation:
A 'responsible' or stable module is one that many other parts of the system depend on (high fan-in) and that has few dependencies itself (low fan-out). The instability metric captures this perfectly. A low value of (close to 0) indicates high stability.
For Module A: Fan-in = 25, Fan-out = 1. . This is very stable.
For Module B: Fan-in = 1, Fan-out = 8. . This is very unstable.
Therefore, Module A (XMLParser) is the far more stable and responsible component. This aligns with architectural principles: utility modules should be stable, while application-specific modules can be more volatile.
Incorrect! Try again.
54Module M1 calls Module M2, passing it a large Employee object. M2 only reads the employeeID and startDate fields to calculate the employee's tenure. This is a classic example of Stamp Coupling. Which refactoring strategy provides the most significant improvement in module independence?
Types of cohesion and coupling
Hard
A.Create a global CurrentEmployee object that M1 sets and M2 reads. This changes the coupling from Stamp to Common.
B.Move the tenure calculation logic from M2 directly into the Employee class itself. M1 would then call employee.calculateTenure(). This eliminates the coupling to M2 entirely.
C.Change M1 to pass only the employeeID and startDate as separate parameters to M2. This changes the coupling from Stamp to Data.
D.Modify M2 to accept the entire Employee object but internally create a copy to avoid side effects, changing the coupling to Data Coupling.
Correct Answer: Move the tenure calculation logic from M2 directly into the Employee class itself. M1 would then call employee.calculateTenure(). This eliminates the coupling to M2 entirely.
Explanation:
While changing from Stamp to Data coupling (Option B) is a definite improvement, it's not the most significant one possible. The problem describes a behavior (calculating tenure) that is intrinsically related to the data it operates on (Employee data). This is a strong indicator that the logic belongs with the data. By moving the calculation into the Employee class, we are following object-oriented principles (Information Hiding, Encapsulation) and significantly improving cohesion within the Employee class. More importantly, it completely eliminates the dependency of M1 on M2 for this function, thus providing the greatest possible improvement in independence. This is a more profound architectural improvement than simply changing the type of coupling.
Incorrect! Try again.
55On a structure chart, a small diamond symbol is drawn at the point where several lines from a superior module converge on a single subordinate module. What does this notation, known as a 'conditional call' or 'decision symbol', represent in the control flow?
Structure Charts - components and notation
Hard
A.The subordinate module returns a value that is a condition used by the superior module for its own logic.
B.The subordinate module will be called repeatedly in a loop until a condition is met.
C.The subordinate module can be called concurrently by multiple threads spawned by the superior module.
D.The superior module will call the subordinate module, but only if a specific condition is true.
Correct Answer: The superior module will call the subordinate module, but only if a specific condition is true.
Explanation:
The diamond symbol on a structure chart represents a decision. It indicates that the call to the subordinate module(s) below it is conditional. The logic within the superior module evaluates some condition, and based on the outcome, it may or may not invoke the subordinate module. This is the standard notation for representing an if-then or case structure in the control flow between modules. A loop is typically represented by a curved arrow around the call line. The return of a condition is just a data couple (upward arrow) and does not require a special symbol at the call site.
Incorrect! Try again.
56A team is building a data processing framework. The lead architect insists on using a complex plugin architecture with abstract base classes and dependency injection, allowing new data formats to be added in the future without modifying the core framework code. A junior developer argues that they only need to support CSV files for the foreseeable future and that this architecture is a case of 'over-engineering'. This conflict highlights the tension between which two design principles?
Basic principles of software design
Hard
A.Liskov Substitution Principle (LSP) vs. Information Hiding
B.Single Responsibility Principle (SRP) vs. Interface Segregation Principle (ISP)
C.Open-Closed Principle (OCP) vs. You Ain't Gonna Need It (YAGNI)
D.Dependency Inversion Principle (DIP) vs. Law of Demeter (LoD)
Correct Answer: Open-Closed Principle (OCP) vs. You Ain't Gonna Need It (YAGNI)
Explanation:
The lead architect is advocating for the Open-Closed Principle (OCP), which states that software entities should be open for extension but closed for modification. The plugin architecture perfectly embodies this: you can extend the system with new formats (plugins) without changing the existing, compiled framework. The junior developer is invoking the principle of YAGNI (You Ain't Gonna Need It), an agile principle that advises against adding functionality or complexity until it is actually required. The core of their disagreement is whether the upfront cost and complexity of building an extensible system (following OCP) is justified when the immediate requirement is simple (as argued by YAGNI).
Incorrect! Try again.
57During a formal design inspection meeting for a critical module, the Author continuously refutes every logged defect with lengthy justifications. The Scribe, being junior, is intimidated and only records defects that the Author agrees are valid. The Moderator notices this dysfunctional dynamic. What is the Moderator's most critical and immediate responsibility according to the formal inspection process?
Design documentation and design review techniques
Hard
A.To halt the meeting, speak with the Author and Scribe privately to remind them of their roles (objective defect finding, not resolution), and restart only if the process can be followed correctly.
B.To overrule the Author and instruct the Scribe to log every potential issue raised by the reviewers.
C.To side with the Author if their justifications seem technically sound to save time.
D.To take over the Scribe's role personally to ensure every point is captured accurately.
Correct Answer: To halt the meeting, speak with the Author and Scribe privately to remind them of their roles (objective defect finding, not resolution), and restart only if the process can be followed correctly.
Explanation:
The Moderator's primary role is to ensure the inspection process is followed correctly and efficiently. The goal of an inspection meeting is defect detection, not defect resolution or debate. The Author's role is to clarify, not to defend. The Scribe's role is to record all potential defects identified by the team. When this process breaks down, the integrity of the review is compromised. The Moderator must intervene. Halting the meeting to reset expectations and reinforce the rules is the most appropriate action. Taking over a role or unilaterally deciding on defects undermines the team process. The goal is to fix the process, not to force a result.
Incorrect! Try again.
58A Level 1 DFD shows a data store D1 with a data flow F1 going from D1 to process P1. The decomposition of P1 into a Level 2 DFD shows sub-process P1.1 and P1.2. Inside this Level 2 diagram, a flow F2 is shown originating from sub-process P1.2 and going to the data store D1. What can be concluded about the validity of this DFD design?
Function-oriented design: DFD - symbols, notations and leveling
Hard
A.The design is invalid. The write operation (F2) from a sub-process (P1.2) to D1 violates balancing because there is no corresponding output flow from the parent process P1 to D1 at Level 1.
B.The design is valid; this simply means that process P1 as a whole reads from and writes to the data store D1, which should be reflected by adding an output flow from P1 to D1 at Level 1.
C.The design is invalid because a data store cannot be both a source and a destination for flows related to a single parent process.
D.The design is valid because data flows between internal processes and data stores do not need to be balanced across levels.
Correct Answer: The design is invalid. The write operation (F2) from a sub-process (P1.2) to D1 violates balancing because there is no corresponding output flow from the parent process P1 to D1 at Level 1.
Explanation:
This scenario tests the balancing rule as it applies to data stores. While data stores themselves can appear at multiple levels, the flows to and from them must be balanced if they cross the process boundary. At Level 1, P1 is shown only reading from D1. At Level 2, the internals of P1 are shown writing to D1. This is a consistency error. If a child diagram shows a flow to/from a data store, the parent diagram must show a corresponding flow from/to that data store. To fix this, a data flow from P1 to D1 must be added on the Level 1 DFD to balance the internal write operation.
Incorrect! Try again.
59A module named SystemMonitor performs three actions: it runs a self-check diagnostic at system startup, it logs runtime errors to a file whenever they occur, and it archives log files during system shutdown. The elements are grouped in this module because they all relate to system lifecycle events. What is the highest level of cohesion exhibited by this module?
Cohesion
Hard
A.Temporal Cohesion
B.Communicational Cohesion
C.Logical Cohesion
D.Procedural Cohesion
Correct Answer: Temporal Cohesion
Explanation:
Temporal Cohesion occurs when elements are grouped together because they are all processed at a similar point in time or during a specific phase of execution. This module's functions—startup, runtime, and shutdown—are related only by the timing of their execution within the system's lifecycle. They do not operate on the same data (not Communicational), nor do they form a required sequence of operations where one's output is another's input (not Sequential). They are not just logically related alternative actions (not Logical). The grouping is based purely on 'when' they happen, which is the definition of Temporal Cohesion, a relatively weak form of cohesion.
Incorrect! Try again.
60In a high-frequency trading application, performance is the absolute highest priority. To minimize latency, a designer makes a conscious decision for the MarketDataProcessor module to directly access and modify a data structure inside the OrderExecution module's memory space, bypassing any function call interfaces. This is a clear instance of Content Coupling. What is the most sophisticated justification for this extreme design choice?
Coupling / Design trade-offs
Hard
A.This is an acceptable design pattern for real-time systems and does not negatively impact software quality.
B.The designer is prioritizing high cohesion within the MarketDataProcessor over low coupling.
C.The designer is using a shared memory approach, which is classified as Common Coupling, not Content Coupling.
D.This design decision represents a trade-off where a critical non-functional requirement (performance) is prioritized over software quality attributes like maintainability and modularity.
Correct Answer: This design decision represents a trade-off where a critical non-functional requirement (performance) is prioritized over software quality attributes like maintainability and modularity.
Explanation:
Content coupling is almost always considered the worst form of coupling and is to be avoided. However, in extreme performance-critical systems (like high-frequency trading, embedded systems, or game engines), designers sometimes have to make difficult trade-offs. The justification is not that it's a 'good' design in terms of software engineering principles, but that it's a necessary evil to meet an overriding non-functional requirement (in this case, microsecond-level performance). The designer is consciously sacrificing maintainability, reusability, and modularity—all of which are severely compromised by content coupling—in order to gain the performance benefits of avoiding function call overhead and data copying. It is a deliberate, albeit risky, trade-off.