Sample questions
Question 1Easy
Which type of coupling is generally considered the best (loosest)?
- Common coupling
- Content coupling
- Control coupling
- Data coupling
Answer: D. Data coupling
Explanation
From best to worst: data, stamp, control, external, common and content coupling. Data coupling passes only the elementary data needed.
Step-by-step solution
- Data coupling passes only the elementary data a module needs.
- Common, content and control coupling tie modules together more tightly.
- So data coupling is the loosest; option D is the correct answer.
Why the other options are wrong
- A. Common coupling shares global data, which ties modules tightly.
- B. Content coupling lets one module use another's internals, which is the tightest.
- C. Control coupling lets one module direct another's logic, which is tighter than data coupling.
Tip: From loosest to tightest: data, stamp, control, external, common, content.
Question 2Easy
What is the difference between high-level design (HLD) and low-level design (LLD)?
- HLD is produced by testers after coding, while LLD is produced by business analysts before requirements are signed off
- HLD is only for testers; LLD is only for clients
- HLD describes system architecture and modules; LLD describes the internal logic of each module
- There is no difference; they are synonyms
Answer: C. HLD describes system architecture and modules; LLD describes the internal logic of each module
Explanation
HLD covers architecture, components and interfaces; LLD details classes, algorithms and data structures inside each component.
Step-by-step solution
- High-level design describes the system architecture and its modules.
- Low-level design describes the internal logic of each module, such as classes and algorithms.
- So option C is the correct answer.
Why the other options are wrong
- A. HLD is not produced by testers after coding; design comes before coding.
- B. HLD and LLD are both design documents for developers, not for one audience each.
- D. They are different levels of design, not synonyms.
Tip: HLD is the big picture; LLD is the detail inside each module.
Question 3Easy
A 'utilities' module contains unrelated functions such as date formatting, file zipping and tax calculation. Its cohesion is:
- Coincidental
- Sequential
- Communicational
- Functional
Answer: A. Coincidental
Explanation
Coincidental cohesion is the weakest: elements are grouped together for no meaningful reason.
Step-by-step solution
- Functions are unrelated.
- That is coincidental cohesion, the weakest.
Why the other options are wrong
- B. Sequential chains outputs.
- C. Communicational shares data.
- D. Functional is a single task.
Tip: Random grouping = coincidental.
Question 4Easy
Which type of cohesion is the best (strongest)?
- Logical cohesion
- Temporal cohesion
- Functional cohesion
- Coincidental cohesion
Answer: C. Functional cohesion
Explanation
From best to worst: functional, sequential, communicational, procedural, temporal, logical and coincidental cohesion.
Step-by-step solution
- Functional cohesion means every element works toward one task.
- It is the strongest type of cohesion.
- So option C is the correct answer.
Why the other options are wrong
- A. Logical cohesion groups tasks by a general category, which is weak.
- B. Temporal cohesion groups tasks that run at the same time, which is weaker.
- D. Coincidental cohesion has no meaningful link between elements, so it is the weakest.
Tip: Aim for functional cohesion: one module, one clear task.
Question 5Medium
Module A passes a flag to module B telling B which of several actions to perform. What type of coupling is this?
- Stamp coupling
- Content coupling
- Data coupling
- Control coupling
Answer: D. Control coupling
Explanation
Passing a control flag means A dictates B's internal logic, which is control coupling.
Step-by-step solution
- Module A passes a flag that tells B which action to perform.
- This lets A control B's internal logic.
- That is control coupling, so option D is the correct answer.
Why the other options are wrong
- A. Stamp coupling passes a composite record, not a control flag.
- B. Content coupling means one module uses another's internals directly.
- C. Data coupling passes only data, with no control flag.
Tip: A flag that changes what the other module does is control coupling.
Question 6Medium
In structured analysis, a context diagram is:
- A class diagram with all attributes
- A flowchart of a single function
- A Gantt chart showing every project task, its owner and its planned start and end dates
- A level-0 DFD showing the whole system as one process with external entities
Answer: D. A level-0 DFD showing the whole system as one process with external entities
Explanation
The context diagram is the top-level data flow diagram: one bubble for the system and the data flows to and from external entities.
Step-by-step solution
- A context diagram is the top-level data flow diagram.
- It shows the whole system as one process, with external entities and the data flows to them.
- So option D, a level-0 DFD, is the correct answer.
Why the other options are wrong
- A. A class diagram is not a context diagram.
- B. A flowchart of one function is not a context diagram.
- C. A Gantt chart is a project plan, not a data flow diagram.
Tip: A context diagram is one process for the whole system, with its external entities.
Question 7Medium
Two modules both read and write the same global variables. This is:
- Common coupling
- Stamp coupling
- Data coupling
- Sequential cohesion
Answer: A. Common coupling
Explanation
Sharing global data is common coupling; a change to the global affects every module that uses it.
Step-by-step solution
- Both modules read and write the same global variables.
- A change to a global affects every module that uses it.
- That is common coupling, so option A is the correct answer.
Why the other options are wrong
- B. Stamp coupling passes a composite data structure, not shared globals.
- C. Data coupling passes only the data needed as arguments.
- D. Sequential cohesion is a cohesion type, not a coupling type.
Tip: Shared global data is common coupling; avoid it where possible.
Question 8Medium
In a Data Flow Diagram, which element is NOT shown?
- Control flow such as loops and decisions
- Processes
- Data stores
- External entities
Answer: A. Control flow such as loops and decisions
Explanation
DFDs show how data moves between processes, stores and external entities; they deliberately omit control logic like loops and conditions.
Step-by-step solution
- DFD shows processes, data stores, data flows, external entities.
- It does not show control logic like loops.
Why the other options are wrong
- B. Processes are shown.
- C. Data stores are shown.
- D. External entities are shown.
Question 9Hard
A module groups statements that all run at system start-up (open log, initialise counters, load config). What type of cohesion is this?
- Logical cohesion
- Temporal cohesion
- Functional cohesion
- Procedural cohesion
Answer: B. Temporal cohesion
Explanation
Temporal cohesion groups tasks because they execute at the same time, not because they serve one function.
Step-by-step solution
- The module groups statements that all run at start-up.
- They are grouped by when they run, not by one function.
- That is temporal cohesion, so option B is the correct answer.
Why the other options are wrong
- A. Logical cohesion groups by a general category, such as all input operations.
- C. Functional cohesion needs one task, not a set of start-up steps.
- D. Procedural cohesion groups elements by the order of steps in a procedure, not by timing.
Tip: Grouping by when things run, such as start-up, is temporal cohesion.
Question 10Hard
A module performs several operations that all use the same input record, such as computing an order's total and printing its address label. What type of cohesion is this?
- Temporal cohesion
- Sequential cohesion
- Coincidental cohesion
- Communicational cohesion
Answer: D. Communicational cohesion
Explanation
Communicational cohesion groups activities that operate on the same data, but without one feeding the next.
Step-by-step solution
- Operations share the same input record.
- That is communicational cohesion.
- Sequential would pass output of one step as input to the next.
Why the other options are wrong
- A. Temporal means done at the same time.
- B. Sequential requires output-to-input chaining.
- C. Coincidental means no relation.
Tip: Same data = communicational.
Practise all 15 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →