Coupling is a measure of the strength of the interconnections between software modules. Which of the following are correct statements with respect to module coupling? P: Common coupling occurs when one module controls the flow of another module by passing it information on what to do. Q: In data coupling, the complete data structure is passed from one module to another through parameters. R: Stamp coupling occurs when modules share a composite data structure and use only parts of it. Code:
Q and R only
Coupling is a fundamental concept in software engineering, measuring how dependent or interconnected software modules are on each other. Lower coupling is generally desired as it makes modules easier to understand, test, and maintain independently.
Let's examine the types of module coupling mentioned in the statements and analyze each statement:
Let's evaluate each statement provided:
Based on the analysis, statement P is incorrect, while statements Q and R are considered correct according to the provided options and correct answer interpretation.
Statements Q and R are correct statements regarding module coupling, based on the specific definitions provided or implied by the question's structure and expected answer.
The correct statements are Q and R only.
| Coupling Type | Description | Characteristics | Desirability (Low to High) |
|---|---|---|---|
| Content Coupling | One module accesses or modifies internal data/code of another. | Strong dependency; highly fragile. | Lowest |
| Common Coupling | Modules share global data. | Dependencies are hard to trace; side effects common. | Low |
| Control Coupling | One module passes control flag to another. | Influences execution flow; less flexible. | Medium-Low |
| Stamp Coupling | Modules pass composite data structures but use only parts. | Dependency on entire structure definition. | Medium |
| Data Coupling | Modules pass only necessary elementary data items via parameters. | Clear dependencies; flexible; reusable. | Highest |
Coupling is one of two primary metrics in evaluating module design quality, the other being cohesion (how related the elements within a single module are). Good design principles aim for low coupling and high cohesion.
Minimizing coupling is a key goal in structured design and object-oriented design principles to create robust, flexible, and maintainable software systems.
Which of the following UML diagrams has a static view ?
Software validation mainly checks for inconsistencies between
To create an object-behavioral model, the analyst performs the following steps:
(A) Evaluates all use-cases
(B) Builds state transition diagram for the system.
(C) Reviews the object behaviour model to verify accuracy and consistency
(D) Identifies events that do not derive the interaction sequence.
Choose the correct answer from the options given below:
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:
A software design pattern often used to restrict access to an object is: