Coupling-and-Cohesion

Question 1

The coupling between different modules of a software is categorized as follows:

    I. Content coupling
    II. Common coupling
    III. Control coupling
    IV. Stamp coupling
    V. Data coupling

Coupling between modules can be ranked in the order of strongest (least desirable) to weakest (most desirable) as follows:

A
I-II-III-IV-V
B
V-IV-III-II-I
C
I-III-V-II-IV
D
IV-II-V-III-I
Question 1 Explanation: 
Note: Out of syllabus. [Software Engineering]
Question 2
The lower degree of cohesion is kind of
A
Logical Cohesion
B
Coincidental Cohesion
C
Procedural Cohesion
D
Communicational Cohesion
Question 2 Explanation: 
Cohesion is a measure of the degree to which elements of a module are functional related.
Question 3
Which of the following types of coupling has the weakest coupling?
A
Pathological coupling
B
Control coupling
C
Data coupling
D
Message coupling
Question 3 Explanation: 
Coupling is the degree of interdependence between software modules; a measure of how closely connected two routines or modules are the strength of the relationships between module
Coupling can be "low" (also "loose" and "weak") or "high" (also "tight" and "strong").
Some types of coupling, in order of highest to lowest coupling, are as follows:
Content coupling (high)
Content coupling is said to occur when one module uses the code of other module, for instance a branch. This violates information hiding - a basic design concept.
Common coupling
Common coupling is said to occur when several modules have access to the same global data. But it can lead to uncontrolled error propagation and unforeseen side-effects when changes are made.
External coupling
External coupling occurs when two modules share an externally imposed data format, communication protocol, or device interface. This is basically related to the communication to external tools and devices.
Control coupling
Control coupling is one module controlling the flow of another, by passing it information on what to do (e.g., passing a what-to-do flag).
Stamp coupling (data-structured coupling)
Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different parts
Data coupling
Data coupling occurs when modules share data through, for example, parameters. Each datum is an elementary piece, and these are the only data shared (e.g., passing an integer to a function that computes a square root).
Question 4

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.

Choose a correct answer from the code given below:

Code:
A
P and Q only
B
P and R only
C
Q and R only
D
All of P, Q and R
Question 4 Explanation: 
Control Coupling : It exists between two modules if data from one module to other is used to direct the order of instruction execution in other module.
Common Coupling : Common coupling take place when two modules share global data.
Content Coupling : Content coupling exists between two modules if their code is shared.
Question 5
The coupling between different modules of a software is categorized as follows:
I. Content coupling
II.Common coupling
III.Control coupling
IV.Stamp Coupling
V.Data Coupling
Coupling between modules can be ranked in the order of strongest(lease desirable) to weakes(most desirable) as follows:
A
I-II-III-IV-V
B
V-IV-III-II-I
C
I-III-V-II-IV
D
IV-II-V-III-I
Question 5 Explanation: 
One of the most widely used for software and systems is Myers’ classification, which defines seven levels of coupling, from tightest to loosest:
● Content coupling - modules rely on each others’ internal data or internal organization
● Common coupling - modules share the same global data
● External coupling - modules share an externally imposed data format, communication protocol or device interface
● Control coupling - one module controls the flow of another, such as by passing it a flag or other information
● Stamp coupling - modules share a composite data structure but use different parts of it
● Data coupling - modules share data through parameters, such as in a subroutine call
● Message coupling - modules communicate by passing messages
Question 6
Which of the following is a desirable property of module?
A
Independency
B
Low Cohesiveness
C
High Coupling
D
Multifunctional
Question 6 Explanation: 
● Highly coupled have program units dependent on each other.
● Loosely coupled are made up of units that are independent or almost independent.
● The desirable property is High cohesion and low coupling
● From the above options , the suitable option is independency
Question 7
Cohesion is an extension of:
A
Abstraction concept
B
Refinement concept
C
Information hiding concept
D
Modularity
Question 7 Explanation: 
→ Cohesion refers to the degree to which the elements inside a module belong together.
→ Cohesion is an extension of Information hiding concept.
There are 7 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access