Software Design Questions with Answers

15 practice questions on Software Design (Software Engineering & Testing) with answers and step-by-step solutions. Try 10 samples below, then practise all 15 free in the AptiNest app.

Sample questions

Question 1Easy

Which type of coupling is generally considered the best (loosest)?

  1. Common coupling
  2. Content coupling
  3. Control coupling
  4. 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

  1. Data coupling passes only the elementary data a module needs.
  2. Common, content and control coupling tie modules together more tightly.
  3. 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)?

  1. HLD is produced by testers after coding, while LLD is produced by business analysts before requirements are signed off
  2. HLD is only for testers; LLD is only for clients
  3. HLD describes system architecture and modules; LLD describes the internal logic of each module
  4. 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

  1. High-level design describes the system architecture and its modules.
  2. Low-level design describes the internal logic of each module, such as classes and algorithms.
  3. 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:

  1. Coincidental
  2. Sequential
  3. Communicational
  4. Functional

Answer: A. Coincidental

Explanation

Coincidental cohesion is the weakest: elements are grouped together for no meaningful reason.

Step-by-step solution

  1. Functions are unrelated.
  2. 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)?

  1. Logical cohesion
  2. Temporal cohesion
  3. Functional cohesion
  4. Coincidental cohesion

Answer: C. Functional cohesion

Explanation

From best to worst: functional, sequential, communicational, procedural, temporal, logical and coincidental cohesion.

Step-by-step solution

  1. Functional cohesion means every element works toward one task.
  2. It is the strongest type of cohesion.
  3. 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?

  1. Stamp coupling
  2. Content coupling
  3. Data coupling
  4. 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

  1. Module A passes a flag that tells B which action to perform.
  2. This lets A control B's internal logic.
  3. 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:

  1. A class diagram with all attributes
  2. A flowchart of a single function
  3. A Gantt chart showing every project task, its owner and its planned start and end dates
  4. 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

  1. A context diagram is the top-level data flow diagram.
  2. It shows the whole system as one process, with external entities and the data flows to them.
  3. 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:

  1. Common coupling
  2. Stamp coupling
  3. Data coupling
  4. 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

  1. Both modules read and write the same global variables.
  2. A change to a global affects every module that uses it.
  3. 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?

  1. Control flow such as loops and decisions
  2. Processes
  3. Data stores
  4. 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

  1. DFD shows processes, data stores, data flows, external entities.
  2. 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?

  1. Logical cohesion
  2. Temporal cohesion
  3. Functional cohesion
  4. 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

  1. The module groups statements that all run at start-up.
  2. They are grouped by when they run, not by one function.
  3. 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?

  1. Temporal cohesion
  2. Sequential cohesion
  3. Coincidental cohesion
  4. 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

  1. Operations share the same input record.
  2. That is communicational cohesion.
  3. 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 →

Related topics

See all Software Engineering & Testing topics · All topics