Coupling is the measure of how much one module or component depends on another. Low coupling means modules work independently, which is good for easier maintenance.
Click to reveal answer
beginner
Define cohesion in the context of software modules.
Cohesion refers to how closely related the tasks performed by a single module are. High cohesion means a module focuses on one task, making it easier to understand and maintain.
Click to reveal answer
intermediate
Why is low coupling preferred in software design?
Low coupling reduces dependencies between modules, so changes in one module have less impact on others. This makes the system easier to update and less error-prone.
Click to reveal answer
intermediate
What does high cohesion help achieve in a software module?
High cohesion helps a module do one thing well, improving clarity, reusability, and ease of testing.
Click to reveal answer
beginner
Give a real-life example to explain coupling and cohesion.
Think of a car: the engine parts have high cohesion because they all work together to make the engine run. The engine and the radio have low coupling because they work independently; changing the radio doesn't affect the engine.
Click to reveal answer
What does low coupling mean in software modules?
AModules depend heavily on each other
BModules work independently with few dependencies
CModules perform many unrelated tasks
DModules are tightly connected
✗ Incorrect
Low coupling means modules have few dependencies and work independently.
Which of the following best describes high cohesion?
AA module focuses on a single task or related tasks
BModules share many variables
CModules are highly dependent on each other
DA module performs many unrelated tasks
✗ Incorrect
High cohesion means a module focuses on one task or closely related tasks.
Why is high cohesion beneficial?
AIt improves clarity and ease of maintenance
BIt increases dependencies between modules
CIt makes modules harder to understand
DIt forces modules to do many unrelated things
✗ Incorrect
High cohesion improves clarity and makes modules easier to maintain.
Which scenario shows tight coupling?
AModules have clear, separate responsibilities
BModules can be changed independently
CModules perform focused tasks
DChanging one module requires changes in many others
✗ Incorrect
Tight coupling means modules depend heavily on each other, so changes affect many parts.
In the car analogy, which pair shows low coupling?
AEngine and pistons
BEngine parts
CEngine and radio
DRadio speakers
✗ Incorrect
The engine and radio work independently, showing low coupling.
Explain in your own words what coupling and cohesion mean in software design.
Think about how modules depend on each other and how focused their tasks are.
You got /4 concepts.
Describe a real-life example that helps you understand coupling and cohesion.
Use everyday objects or systems you know well.
You got /3 concepts.
Practice
(1/5)
1. What does low coupling in software design mean?
easy
A. Modules have few dependencies on each other
B. Modules perform many unrelated tasks
C. Modules are tightly connected and dependent
D. Modules share all their data freely
Solution
Step 1: Understand coupling concept
Coupling measures how much modules depend on each other.
Step 2: Interpret low coupling
Low coupling means modules have few dependencies, making them independent.
Final Answer:
Modules have few dependencies on each other -> Option A
Quick Check:
Low coupling = few dependencies [OK]
Hint: Low coupling means less dependency between modules [OK]
Common Mistakes:
Confusing low coupling with high dependency
Thinking low coupling means modules do many tasks
Mixing coupling with cohesion concepts
2. Which of the following best describes high cohesion in a module?
easy
A. The module depends heavily on other modules
B. The module performs many unrelated tasks
C. The module focuses on a single, well-defined task
D. The module shares data with all other modules
Solution
Step 1: Understand cohesion concept
Cohesion measures how focused a module is on a single task.
Step 2: Interpret high cohesion
High cohesion means the module focuses on one clear, well-defined task.
Final Answer:
The module focuses on a single, well-defined task -> Option C
Quick Check:
High cohesion = single focused task [OK]
Hint: High cohesion means one clear task per module [OK]
Common Mistakes:
Thinking high cohesion means many unrelated tasks
Confusing cohesion with coupling
Assuming high cohesion means high dependency
3. Consider two modules: Module A calls Module B frequently and shares many variables. Module C performs one clear task independently. Which statement is true?
medium
A. Module A has low coupling and high cohesion
B. Module A has high coupling and Module C has high cohesion
C. Module B has high cohesion and low coupling
D. Module C has high coupling and Module A has low cohesion
Solution
Step 1: Analyze Module A and B relationship
Module A calls Module B frequently and shares many variables, indicating high coupling.
Step 2: Analyze Module C's task focus
Module C performs one clear task independently, indicating high cohesion.
Final Answer:
Module A has high coupling and Module C has high cohesion -> Option B
Quick Check:
High coupling = many dependencies; High cohesion = focused task [OK]
Hint: Frequent calls = high coupling; single task = high cohesion [OK]
Common Mistakes:
Mixing which module has high coupling
Confusing cohesion with coupling
Assuming independence means low cohesion
4. A software module is designed to handle user input, process data, and generate reports all in one. What is the main problem here?
medium
A. The module has low cohesion
B. The module has low coupling
C. The module is highly focused
D. The module is loosely connected
Solution
Step 1: Identify tasks in the module
The module handles user input, processes data, and generates reports, which are different tasks.
Step 2: Assess cohesion level
Because it does many unrelated tasks, the module has low cohesion.
Final Answer:
The module has low cohesion -> Option A
Quick Check:
Multiple unrelated tasks = low cohesion [OK]
Hint: Many tasks in one module means low cohesion [OK]
Common Mistakes:
Confusing low cohesion with low coupling
Thinking multiple tasks mean high cohesion
Ignoring the definition of cohesion
5. You have a large software system with modules that share many variables and perform multiple unrelated tasks. To improve design, which approach should you take?
hard
A. Increase coupling and decrease cohesion
B. Increase both coupling and cohesion
C. Keep coupling and cohesion as they are
D. Decrease coupling and increase cohesion
Solution
Step 1: Identify current design issues
Modules share many variables (high coupling) and perform unrelated tasks (low cohesion).
Step 2: Apply good design principles
Good design aims for low coupling (less dependency) and high cohesion (focused tasks).
Final Answer:
Decrease coupling and increase cohesion -> Option D
Quick Check:
Good design = low coupling + high cohesion [OK]
Hint: Aim for less dependency and focused tasks [OK]
Common Mistakes:
Thinking increasing coupling improves design
Confusing cohesion with coupling
Ignoring the benefits of modular design
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.