All Exams Test series for 1 year @ ₹349 only
Question

Software coupling involves dependencies among pieces of software called modules. Which of the following are correct statements with respect to module coupling?

P: Common Coupling occurs when two modules share the same global data

Q: control Coupling occur when modules share a composite data structure and use only part of it.

R: Content coupling occurs when one module modifies or relies on the internal working of another module.

The correct answer is

P and R only

Understanding Software Coupling and Module Dependencies

Software coupling is a measure of how much different software modules depend on each other. High coupling means modules are highly dependent, which can make software harder to understand, modify, and test. Low coupling is generally desired in software design.

Analyzing the Statements on Module Coupling

Let's examine each statement provided regarding module coupling:

  • Statement P: Common Coupling occurs when two modules share the same global data.

This statement accurately describes Common Coupling. In Common Coupling, multiple modules access and modify the same global data structure. This creates strong dependencies because changes to the global data structure or how one module uses it can affect all other modules accessing it. This is generally considered undesirable due to the difficulty in tracing data flow and potential side effects.

  • Statement Q: control Coupling occur when modules share a composite data structure and use only part of it.

This statement describes Stamp Coupling (or possibly Data Coupling if only a primitive data type is shared, although the phrasing "composite data structure" points more towards Stamp Coupling). Control Coupling occurs when one module passes a piece of information (like a flag or command) to another module that controls the logic or flow of execution in the receiving module. Therefore, statement Q is incorrect with respect to Control Coupling.

  • Statement R: Content coupling occurs when one module modifies or relies on the internal working of another module.

This statement correctly defines Content Coupling (also known as Pathological Coupling). This is the highest and worst form of coupling. Examples include one module modifying another module's local data, accessing its internal variables directly, or branching into the middle of another module's code. This makes modules highly interdependent and changes in one module's internal implementation directly break another module.

Evaluating the Correct Statements

Based on the analysis:

  • Statement P is correct.
  • Statement Q is incorrect (it describes Stamp Coupling, not Control Coupling).
  • Statement R is correct.

Therefore, the correct statements are P and R.

Conclusion

The question asks which of the statements P, Q, and R are correct with respect to module coupling types. Our analysis shows that statements P (Common Coupling definition) and R (Content Coupling definition) are correct, while statement Q (Control Coupling definition) is incorrect.

Coupling Type Description Dependency Level
Content Coupling One module depends on the internal implementation details of another module. Highest / Worst
Common Coupling Modules share global data. High
Control Coupling One module passes a control flag/value to another, influencing its logic. Moderate
Stamp Coupling Modules share a composite data structure but only use parts of it. Lower Moderate
Data Coupling Modules exchange data through parameters of primitive types. Low / Best (among procedural)
No Coupling Modules are completely independent. Lowest / Ideal

The option that correctly identifies P and R as the correct statements is the right answer.

Revision Table: Types of Software Coupling

Coupling Type Characteristics Impact on Maintainability Desirability
Content (Pathological) Module A accesses/modifies internal data/code of Module B. Very Hard Least Desirable
Common (Global) Modules share global variables. Hard (side effects are hard to trace) Undesirable
Control Module A passes a flag to Module B that controls B's logic. Moderate (B depends on A's control choice) Acceptable in specific cases
Stamp (Data Structure) Module A passes a data structure to Module B, and B uses only part of it. Fair (B depends on the structure, even if it doesn't use all of it) Better than Control, Common, Content
Data Module A passes simple data (parameters) to Module B. Easy (dependencies are clear) Most Desirable (in procedural design)

Additional Information on Software Coupling and Cohesion

Coupling is closely related to another software design principle called Cohesion. While coupling measures dependencies BETWEEN modules, cohesion measures how related the elements WITHIN a single module are. Good software design aims for low coupling and high cohesion.

Think of it like a team:

  • Coupling: How much do different teams (modules) rely on each other's internal workings or shared resources? Low coupling means teams can work relatively independently.
  • Cohesion: How focused is a single team (module) on a specific set of related tasks? High cohesion means a team has a clear, single purpose.

Achieving low coupling and high cohesion leads to software systems that are easier to understand, debug, modify, and reuse. These are fundamental principles in modular design and object-oriented programming.

Various types of cohesion exist, such as Functional Cohesion (most desirable), Sequential Cohesion, Communicational Cohesion, Procedural Cohesion, Temporal Cohesion, Logical Cohesion, and Coincidental Cohesion (least desirable).

Was this answer helpful?

Important Questions from Design and Analysis

  1. Which of the following UML diagrams has a static view ?

  2. Match the following in Software Engineering:

    List – I

    List – II

    (a)

    Product Complexity

    (i)

    Software Requirements Definition

    (b)

    Structured System Analysis

    (ii)

    Software Design

    (c)

    Coupling and Cohesion

    (iii)

    Validation Technique

    (d)

    Symbolic Execution

    (iv)

    Software Cost Estimation

  3. Software validation mainly checks for inconsistencies between

  4. Which of the following statements is/are TRUE?

    P: In software engineering, defects that are discovered earlier are more expensive to fix

    Q: A software design is said to be a good design, if the components are strongly cohesive and weakly coupled

    Select the correct answer from the options given below:

  5. Which of the following are the primary objectives of risk monitoring in software project tracking?

    P: To assess whether predicted risks do, in fact, occur
    Q: To ensure that risk aversion steps defined for the risk are being properly applied
    R: To collect information that can be used for future risk analysis

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App