1. Gyanastra
  2. Software Engineering
  3. Software Design
  4. Design Concepts and Principles
Free lesson, no account needed 12 min read 25 practice questions after it
Asked in past papers7 times
  • UGC NET2022201620152013201020062005

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):

RankCohesionMeaning
1CoincidentalParts unrelated — arbitrary grouping
2LogicalLogically similar tasks; caller selects one
3TemporalExecuted in the same time period (e.g., init, shutdown)
4ProceduralExecuted in a fixed order
5CommunicationalOperate on the same input/output data set
6SequentialOutput of one element is input to the next
7FunctionalEvery element contributes to one, single, well-defined function — best

6. Measure coupling ladder (worst → best):

RankCouplingMeaning
1ContentOne module directly modifies or relies on internals of another — worst
2CommonTwo modules share global data
3ExternalTwo modules share an externally imposed data format / device
4ControlOne module passes a flag/control parameter that steers another's logic
5Stamp (data-structure)Modules share a composite data structure, using only parts of it
6DataOnly 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).

Figure. Notice the sequence: requirements, abstraction, modular decomposition, stepwise refinement, information hiding, high cohesion, low coupling, refactoring if needed, then detailed design. The nearby text calls it a repeatable sequence every design follows.

Formulas

  • Design Structure Quality Index (DSQI) — Pressman's form:

DSQI=∑i=17wi xi\mathrm{DSQI} = \sum_{i=1}^{7} w_i\,x_i

  • with:

  • S1S_1: total modules in the program architecture

  • S2S_2: modules whose correct function depends on source of data input, or that produce data used elsewhere

  • S3S_3: modules whose correct function depends on prior processing

  • S4S_4: number of database items

  • S5S_5: total unique database items

  • S6S_6: database segments

  • S7S_7: modules with single entry and single exit

  • D1D_1: modules not clearly understood

  • D2D_2: database items not clearly understood

  • Component terms:

  • x1=1−S3/S1x_1 = 1 - S_3/S_1, w1=0.23w_1=0.23 — fraction of modules not dependent on prior processing

  • x2=1−S2/S1x_2 = 1 - S_2/S_1, w2=0.23w_2=0.23

  • x3=1−S5/S4x_3 = 1 - S_5/S_4, w3=0.12w_3=0.12

  • x4=S7/S1x_4 = S_7/S_1, w4=0.23w_4=0.23

  • x5=1−S6/S4x_5 = 1 - S_6/S_4, w5=0.08w_5=0.08

  • x6=1−D1/S1x_6 = 1 - D_1/S_1, w6=0.06w_6=0.06

  • x7=1−D2/S4x_7 = 1 - D_2/S_4, w7=0.05w_7=0.05

  • Weights sum to 1.001.00; DSQI ranges from 00 (poor) to 11 (excellent).

  • Prior-processing fraction (the quantity the exam typically asks):

fraction NOT dependent on prior processing=S1−S3S1=1−S3S1.\text{fraction NOT dependent on prior processing} = \frac{S_1 - S_3}{S_1} = 1 - \frac{S_3}{S_1}.

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 S1=60S_1=60 modules and S3=15S_3=15 of them depend on prior processing. Compute the prior-processing component x1x_1 of the DSQI and its weighted contribution.
Step 1. x1=1−15/60=1−0.25=0.75x_1 = 1 - 15/60 = 1 - 0.25 = 0.75.
Step 2. Weighted contribution =w1x1=0.23×0.75=0.1725= w_1 x_1 = 0.23 \times 0.75 = 0.1725.
Answer: x1=0.75x_1 = 0.75; weighted contribution ≈0.1725\approx 0.1725.

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

CohesionCoupling
Intra-moduleInter-module
Want highWant low
Functional = best; coincidental = worstData = best; content = worst
Groups responsibilities togetherMeasures dependence on other modules
ConceptOne-line meaning
AbstractionFocus on essentials, hide operational detail
Information hidingHide design decisions likely to change
ModularityDecompose into separately identifiable components
RefinementTop-down elaboration from abstract to detailed
RefactoringImprove internal structure without changing external behaviour
EncapsulationPackaging of data and operations; the implementation mechanism for modularity
Model / viewCaptures
OMT Object modelStatic structure — classes, associations
OMT Dynamic modelStates and transitions of objects
OMT Functional modelData transformations (functions)
State diagramDynamic behaviour of one object
Class diagramStatic/structural view
Use-case diagramExternal actors interacting with the system
Layer typeDirection
Top-down designGeneral → specific (stepwise refinement)
Bottom-up designSpecific → general; successive layers = layers of abstraction

Revision summary

  1. Design rule of thumb: high cohesion + low coupling, everywhere.
  2. Cohesion best = functional; worst = coincidental.
  3. Coupling best = data; worst = content.
  4. Abstraction is the first design activity; refinement is its complement (elaboration).
  5. Cohesion is an extension of information hiding.
  6. Top-down = general → specific, postpone minor decisions, systematic;
    bottom-up = successive layers of abstraction.
  7. Refactoring never adds features, never changes external behaviour.
  8. DSQI component for prior processing: 1−S3/S11 - S_3/S_1.
  9. Encapsulation is the key that turns "maximise cohesion, minimise coupling" into code.
  10. Architecture affects performance, reliability, portability — least influence on usability.
  11. MVC: Model = domain logic, View = UI, Controller = translates UI events to model calls.
  12. 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 1−S3/S11 - S_3/S_1, 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:

  1. State, in one sentence each, the definitions of abstraction, information hiding, modularity, refinement, refactoring and encapsulation.
  2. Write the full cohesion ladder from coincidental to functional and place any described module on the correct rung.
  3. Write the full coupling ladder from content to data and identify the coupling type from a short code or description.
  4. Explain why high cohesion and low coupling is the correct design objective, and why the opposite is never preferred.
  5. State the DSQI prior-processing component 1−S3/S11 - S_3/S_1 and compute it for given S1S_1 and S3S_3.
  6. Match each of the six design principles to its one-line definition without referring to notes.
  7. Distinguish top-down from bottom-up design in two sentences and state which layers are "layers of abstraction".
  8. Recite SOLID with the correct expansion of each letter and one example of a typical violation.
  9. Explain MVC's three roles and state which one owns domain logic, which owns the UI, and which translates events to operations.
  10. 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.

Pages 1–2 of 2