Topic 3 Flashcards

Coupling - Theory & Analysis

1
Q

What is module coupling?

A

The manner and degree of interdependence between software modules or components in a system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is coupling defined in software design?

A

A measure of the interdependence among modules in a computer program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is decoupling?

A

The process of reducing the interdependence between software modules or components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are all the types of coupling (6) ?

A
  1. Content Coupling
  2. Common(-environment) Coupling
  3. Data/Input-Output Coupling
  4. Control Coupling
  5. Hybrid Coupling
  6. Pathological Coupling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is content coupling (1)?

A

A type of coupling where one module relies on the internal details of another module.

  • best to avoid
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the characteristics of content coupling?

A
  • One module changes a statement in another module
  • References or alters data contained inside another module
  • One module branches into another module
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the impact of content coupling on code maintainability?

A

It creates tightly intertwined code that is hard to understand, maintain, and modify.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is common-environment or common coupling (2)?

A

A type of coupling where multiple modules share access to global data or resources.

*can read/write same files
*tight interdependence/coupling, reduce modularity, violates encapsulation & hard to maintain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When can common coupling be considered good?

A

When it simplifies design, ensures consistency, and reduces duplication in smaller systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the risks associated with common coupling?

A

Tight coupling, reduced modularity, and maintenance challenges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is data coupling (3)?

A

A type of coupling in which output from one software module serves as input to another module.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is data coupling considered good?

A

It promotes encapsulation, modularity, and maintainability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is control coupling (4)?

A

When one module controls the behavior of another by passing a control flag or parameter.

  • hard to understand & maintain
  • tight interdependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the pros of control coupling?

A

Good when it provides flexible control with minimal direct dependencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is hybrid coupling (5)?

A

A type of coupling where different subsets of a data item’s range are used for different purposes in different modules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the pros of hybrid coupling?

A

flexible & practical solution for integrating modules

17
Q

What is pathological coupling (6)?

A

A type of coupling where one module affects or depends upon the internal implementation of another.

*bad
*complex, fragile & hard to maintain system

18
Q

What is the ideal relationship between coupling and cohesion?

A

Low coupling and high cohesion.

19
Q

What does high cohesion mean in software?

A

Each part of the software has a clear purpose and sticks to it.

20
Q

Fill in the blank: A good software design aims for _______ coupling.

21
Q

True or False: High coupling makes it easier to maintain software.

22
Q

What is the goal of decoupling?

A

To create a system where components can be developed, modified, tested, and deployed independently.