0
0
Software Engineeringknowledge~20 mins

Coupling and cohesion in Software Engineering - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Coupling and Cohesion Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Coupling Types

Which of the following best describes loose coupling in software design?

AModules depend heavily on each other's internal details.
BModules are combined into a single large block of code.
CModules interact through well-defined interfaces with minimal dependencies.
DModules share global variables extensively.
Attempts:
2 left
💡 Hint

Think about how modules should communicate to reduce problems when one changes.

📋 Factual
intermediate
2:00remaining
Identifying Cohesion Levels

Which of the following is an example of functional cohesion in a software module?

AA module that processes a customer order from start to finish.
BA module that contains utility functions for different unrelated calculations.
CA module that performs several unrelated tasks like logging, data validation, and user input.
DA module that only stores global variables.
Attempts:
2 left
💡 Hint

Functional cohesion means all parts of the module work together to perform one clear task.

🔍 Analysis
advanced
2:00remaining
Analyzing Coupling Impact

Consider two modules: Module A calls Module B's internal functions directly, and Module C calls Module D only through a public interface. Which statement is true about their coupling?

AModule A and B have loose coupling; Module C and D have tight coupling.
BModule A and B have tight coupling; Module C and D have loose coupling.
CBoth pairs have loose coupling.
DBoth pairs have tight coupling.
Attempts:
2 left
💡 Hint

Directly calling internal functions increases dependency and coupling.

Comparison
advanced
2:00remaining
Comparing Cohesion Types

Which of the following best compares logical cohesion and functional cohesion?

ALogical cohesion groups unrelated tasks triggered by the same event; functional cohesion groups tasks that contribute to a single function.
BLogical cohesion groups tasks that perform one function; functional cohesion groups unrelated tasks.
CLogical cohesion means modules have no cohesion; functional cohesion means modules are tightly coupled.
DLogical cohesion and functional cohesion are the same.
Attempts:
2 left
💡 Hint

Think about whether tasks are related by purpose or just by timing.

Reasoning
expert
2:00remaining
Evaluating Design for Maintainability

A software system has modules with high cohesion but also high coupling. What is the most likely impact on maintainability?

AThe system is easy to maintain because high coupling improves module communication.
BThe system is easy to maintain because high cohesion always ensures low coupling.
CThe system is hard to maintain because high cohesion causes modules to be too independent.
DThe system is hard to maintain because high coupling causes changes in one module to affect many others despite high cohesion.
Attempts:
2 left
💡 Hint

Consider how coupling affects the impact of changes across modules.