Software Engineering · Software Design
Design Concepts and Principles
Overview
Software design is the activity that converts a validated requirements specification into a blueprint (architecture + detailed design) from which code can be built.
In the UGC NET syllabus it sits under Software Engineering → Software Design and supplies the vocabulary used in almost every later question on architecture, component-level design and quality metrics.
The heart of the lesson is the design principles — abstraction, information hiding, modularity, refinement, refactoring — and the two quality metrics every design is judged against: cohesion (intra-module strength, must be high) and coupling (inter-module dependence, must be low).
You need a basic idea of what a "module" is and of the SDLC phases before reading this; nothing else is assumed.
Key concepts
- Abstraction: a mechanism that lets the designer focus on the essential details of a component while suppressing operational (implementation) details. It is the first design activity.
Two standard kinds: procedural abstraction (names a sequence of instructions by what it does, hiding how), and data abstraction (hides the internal representation of data and exposes only operations). - Information hiding: encapsulate design decisions most likely to change; only a well-defined interface is exposed, internals stay private.
In several textbooks cohesion is described as a natural extension of information hiding. - Localization: the characteristic of software that shows how information is concentrated within a program — closely tied to packaging/encapsulation.
- Modularity: dividing software into separately identifiable, self-contained components (modules). The guiding rule is maximise cohesion, minimise coupling; encapsulation is the mechanism that implements this rule.
- Refinement (stepwise refinement): top-down elaboration of a high-level procedural abstraction down to programming-language statements — i.e., working general → specific, deferring minor decisions, following a systematic procedure.
It is described as the complement of abstraction and a process of elaboration. - Refactoring: restructuring existing code so that external behaviour is unchanged but internal structure improves (readability, maintainability). Adding new features is not refactoring.
- Coupling: degree of dependence between modules — wanted LOW. Standard order worst → best: content > common > external > control > stamp > data.
- Cohesion: strength of relation among elements inside one module — wanted HIGH. Standard order worst → best: coincidental < logical < temporal < procedural < communicational < sequential < functional.
- Software architecture: the structure or structures of a system, comprising software components, their externally visible properties, and the relationships among them (Bass–Clements–Kazman definition).
Architecture strongly affects performance, reliability, portability, security, maintainability; it affects usability least among the four options usually offered in exams. - MVC pattern: Model = business logic and domain objects; View = user interface; Controller = translates user-interface events into operations on the model.
- OMT (Object Modelling Technique, Rumbaugh) has three models: Object model (static structure), Dynamic model (state transitions), Functional model (data transformation).
- DSQI (Design Structure Quality Index, Card & Glass; adapted by Pressman): a single 0–1 metric built from module, database and interface factors S1…S7 (see Formulas).
- SOLID (object-oriented design principles):
- Single Responsibility — one reason to change.
- Open–Closed — open for extension, closed for modification.
- Liskov Substitution — subtypes must be usable wherever the base type is expected.
- Interface Segregation — no client should be forced to depend on methods it does not use.
- Dependency Inversion — depend on abstractions, not on concretions; high-level and low-level modules both depend on abstractions.
How it works
Design pipeline. Every design follows a repeatable sequence:
1. Start with abstraction. Model the problem by extracting essential features; defer data types, storage, algorithms.
2. Modularise. Split the system into modules so each module owns a distinct concern; changes inside one module should not ripple to unrelated ones.
3. Refine top-down. At each level, decompose the current module into sub-modules until each leaf is small enough to code directly.
(Top-down uses step-wise refinement, flow-charting and modularity; it does not require loop invariants, which are a tool of formal correctness proofs, not of top-down design.)
4. Hide decisions. Publish only interfaces; keep volatile decisions (data structures, algorithms) private.
5. Measure cohesion ladder (worst → best):
| Rank | Cohesion | Meaning |
|---|---|---|
| 1 | Coincidental | Parts unrelated — arbitrary grouping |
| 2 | Logical | Logically similar tasks; caller selects one |
| 3 | Temporal | Executed in the same time period (e.g., init, shutdown) |
| 4 | Procedural | Executed in a fixed order |
| 5 | Communicational | Operate on the same input/output data set |
| 6 | Sequential | Output of one element is input to the next |
| 7 | Functional | Every element contributes to one, single, well-defined function — best |
6. Measure coupling ladder (worst → best):
| Rank | Coupling | Meaning |
|---|---|---|
| 1 | Content | One module directly modifies or relies on internals of another — worst |
| 2 | Common | Two modules share global data |
| 3 | External | Two modules share an externally imposed data format / device |
| 4 | Control | One module passes a flag/control parameter that steers another's logic |
| 5 | Stamp (data-structure) | Modules share a composite data structure, using only parts of it |
| 6 | Data | Only simple data (values/parameters) passed — best |
7. Refactor. Whenever you spot SRP violations, duplicated code, dead code, or long methods, restructure — but keep external behaviour identical.
8. Bottom-up layers. In bottom-up design, each successive layer built on top of the previous one is a layer of abstraction — it hides the details of the layer below. (The exam treats abstraction as the correct label for these successive layers.)
9. Reusable-method style rules. Keep methods coherent (single function), small (split large methods), consistent (parallel structure), and offer uniform coverage (consistent API surface, e.g., a getLast alongside getFirst).
Drawing the diagram…
Formulas
- Design Structure Quality Index (DSQI) — Pressman's form:
-
with:
-
: total modules in the program architecture
-
: modules whose correct function depends on source of data input, or that produce data used elsewhere
-
: modules whose correct function depends on prior processing
-
: number of database items
-
: total unique database items
-
: database segments
-
: modules with single entry and single exit
-
: modules not clearly understood
-
: database items not clearly understood
-
Component terms:
-
, — fraction of modules not dependent on prior processing
-
,
-
,
-
,
-
,
-
,
-
,
-
Weights sum to ; DSQI ranges from (poor) to (excellent).
-
Prior-processing fraction (the quantity the exam typically asks):
Worked examples
Example 1 — cohesion ladder (easy). A module groups print, save, email and delete operations on a Customer record, all in one class. Which design-quality issue is most serious?
Step 1. Are all elements related to one function? No — they touch a single record but do different jobs.
Step 2. Cohesion category: logical (caller picks one operation).
Step 3. Fix: split into focused modules (one per responsibility) → move toward functional cohesion.
Answer: low logical cohesion; SRP violation; split into multiple classes.
Example 2 — coupling ladder (medium). Rank these four links from loosest to tightest: (i) module A passes a scalar int to B; (ii) A passes a Customer object of which B uses only name; (iii) A passes a flag that switches B's algorithm; (iv) A writes into B's local variable array.
Step 1. (i) simple value → data coupling (best).
Step 2. (ii) whole composite, uses a subset → stamp coupling.
Step 3. (iii) flag steers logic → control coupling.
Step 4. (iv) direct internal access → content coupling (worst).
Answer (loosest → tightest): (i) data → (ii) stamp → (iii) control → (iv) content.
Example 3 — statement type (medium two-step).
Statement I: Cohesion is often described as an extension of information hiding.
Statement II: Refactoring adds new functionality required by the customer.
Step 1. Cohesion packages what should be decided together; it extends the "hide what changes" idea → I is true.
Step 2. Refactoring must NOT change external behaviour and must NOT add features → II is false.
Answer: Statement I only.
Example 4 — numeric DSQI (hard). In a program architecture modules and of them depend on prior processing. Compute the prior-processing component of the DSQI and its weighted contribution.
Step 1. .
Step 2. Weighted contribution .
Answer: ; weighted contribution .
Example 5 — match-the-list (hard).
Match:
A. Abstraction — i. exposing what matters, suppressing how
B. Information hiding — ii. private decisions behind a public interface
C. Refactoring — iii. improving internal structure, behaviour unchanged
D. Modularity — iv. dividing software into separate components
Step 1. A "suppresses operational details" → matches i.
Step 2. B "private internals" → ii.
Step 3. C "no external change" → iii.
Step 4. D "separate identifiable components" → iv.
Answer: A–i, B–ii, C–iii, D–iv.
Comparison
| Cohesion | Coupling |
|---|---|
| Intra-module | Inter-module |
| Want high | Want low |
| Functional = best; coincidental = worst | Data = best; content = worst |
| Groups responsibilities together | Measures dependence on other modules |
| Concept | One-line meaning |
|---|---|
| Abstraction | Focus on essentials, hide operational detail |
| Information hiding | Hide design decisions likely to change |
| Modularity | Decompose into separately identifiable components |
| Refinement | Top-down elaboration from abstract to detailed |
| Refactoring | Improve internal structure without changing external behaviour |
| Encapsulation | Packaging of data and operations; the implementation mechanism for modularity |
| Model / view | Captures |
|---|---|
| OMT Object model | Static structure — classes, associations |
| OMT Dynamic model | States and transitions of objects |
| OMT Functional model | Data transformations (functions) |
| State diagram | Dynamic behaviour of one object |
| Class diagram | Static/structural view |
| Use-case diagram | External actors interacting with the system |
| Layer type | Direction |
|---|---|
| Top-down design | General → specific (stepwise refinement) |
| Bottom-up design | Specific → general; successive layers = layers of abstraction |
Revision summary
- Design rule of thumb: high cohesion + low coupling, everywhere.
- Cohesion best = functional; worst = coincidental.
- Coupling best = data; worst = content.
- Abstraction is the first design activity; refinement is its complement (elaboration).
- Cohesion is an extension of information hiding.
- Top-down = general → specific, postpone minor decisions, systematic;
bottom-up = successive layers of abstraction. - Refactoring never adds features, never changes external behaviour.
- DSQI component for prior processing: .
- Encapsulation is the key that turns "maximise cohesion, minimise coupling" into code.
- Architecture affects performance, reliability, portability — least influence on usability.
- MVC: Model = domain logic, View = UI, Controller = translates UI events to model calls.
- Loop invariants belong to formal verification, not to top-down design.
Previous-year exam insights
- The most frequent direct-concept question is "which combination of cohesion and coupling is preferred" — always high cohesion, low coupling.
- Definition-matching questions (List-I concept ↔ List-II definition) appear repeatedly across abstraction, information hiding, modularity, cohesion, coupling, localization.
Learn the exact textbook wording. - Coupling type identification from a described scenario (global data → common; flag → control; subset of composite → stamp; internal access → content) is a standard MCQ.
- Statement I / Statement II questions test exact definitions: "refactoring", "cohesion as extension of information hiding", "abstraction as first step".
- Numeric DSQI questions ask for the prior-processing fraction , not the whole DSQI — do not overcomplicate.
- Trap: "adding new features" appears in options about refactoring; the correct statement is only "improves internal structure, external behaviour unchanged".
- Trap: top-down options often include loop invariants as a plausible-sounding distractor; correct answer excludes it (top-down uses step refinement, flow-charting, modularity).
- Trap: architecture-quality questions list four non-functional attributes; usability is the odd one out because it depends more on UI than on architecture.
- Check first: the word in the stem — "objective", "principle", "layer", "extended concept" — each points to a specific canonical sentence you must recall.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- State, in one sentence each, the definitions of abstraction, information hiding, modularity, refinement, refactoring and encapsulation.
- Write the full cohesion ladder from coincidental to functional and place any described module on the correct rung.
- Write the full coupling ladder from content to data and identify the coupling type from a short code or description.
- Explain why high cohesion and low coupling is the correct design objective, and why the opposite is never preferred.
- State the DSQI prior-processing component and compute it for given and .
- Match each of the six design principles to its one-line definition without referring to notes.
- Distinguish top-down from bottom-up design in two sentences and state which layers are "layers of abstraction".
- Recite SOLID with the correct expansion of each letter and one example of a typical violation.
- Explain MVC's three roles and state which one owns domain logic, which owns the UI, and which translates events to operations.
- Write the Bass–Clements–Kazman definition of software architecture from memory and say which non-functional attribute it affects least.
Attempt the sub-topic test first, then the subject test.