Knowledge / Computer Science and Engineering / Requirements engineering and UML

Requirements engineering and UML

Computer Science and Engineering (B.E./B.Tech) · Software engineering · free study notes for exams, placements and interviews

In short

Requirements engineering (RE) is the disciplined process of discovering, analysing, documenting, validating and managing what a software system must do and how well it must do it, before and while it is built. UML (Unified Modeling Language, OMG standard, current version 2.5.1) is the notation used to model those requirements and the design that follows — 14 diagram types split into structural and behavioural. The pairing matters because most Indian IT service work (TCS, Infosys, Wipro, HCLTech, Cognizant, Accenture, Capgemini, LTIMindtree) is contracted on a BRD/FRD/SRS and reviewed against CMMI or ISO 9001 process audits, and a requirement defect that escapes to production costs orders of magnitude more to fix. Software engineering is no longer in the GATE CSE syllabus, but this topic carries heavy weight in university end-semester papers, UGC-NET Computer Science Paper 2, ISRO/BARC/DRDO scientist exams, NIELIT and PSU papers, and UML diagrams are asked in almost every fresher and business-analyst interview round.

Explained

What a requirement is, and the kinds of requirements

The RE process — five activities

  1. Feasibility study: is it technically, operationally, economically and legally possible? Output: a short feasibility report that may kill the project.
  2. Elicitation (gathering): interviews (structured/unstructured), questionnaires, workshops and JAD (joint application development), brainstorming, FAST (facilitated application specification technique), observation/ethnography, document and interface analysis, prototyping (throwaway vs evolutionary), QFD (quality function deployment — classifies as normal, expected and exciting requirements), scenarios and use cases, viewpoint-oriented elicitation, competitor benchmarking.
  3. Analysis and negotiation: classify, check for conflicts, overlaps, ambiguity, infeasibility; resolve stakeholder conflicts; prioritise; build models (use case, class, DFD, state machine); produce a data dictionary.
  4. Specification: write the SRS — the baselined contract between customer and developer.
  5. Validation and verification: confirm the SRS describes the *right* system — formal reviews and Fagan inspections, walkthroughs, checklists, prototype demonstration, model validation, writing acceptance test cases from each requirement, and (rarely, in safety work) formal methods such as Z or VDM.
  6. Requirements management runs across the whole life cycle: baselining, version control, a Change Control Board (CCB), impact analysis, and traceability.
  7. Traceability is *forward* (requirement → design → code → test), *backward* (test or code → requirement, to detect gold plating) and *bidirectional*; captured in a Requirements Traceability Matrix (RTM). CMMI and regulated audits insist on it.
  8. Classic elicitation problems: stakeholders don't know what they want, tacit knowledge, conflicting views, shifting priorities (requirements volatility), scope creep (uncontrolled growth) and gold plating (developers adding unasked features).

The SRS: standards, quality criteria, prioritisation

UML: what it is and the 14 diagrams

Structural diagrams in detail

Behavioural diagrams in detail

Requirements in current Indian practice

Key points

Formulas and examples

Use Case Points UCP = UUCP × TCF × ECF, where UUCP = UAW + UUCW
UAW (unadjusted actor weight): simple actor (API/system) = 1, average (protocol/text interface) = 2, complex (GUI human) = 3
UUCW (unadjusted use case weight): simple (≤3 transactions) = 5, average (4-7) = 10, complex (>7) = 15
TCF = 0.6 + 0.01 × Σ(weight × rating) over 13 technical factors, rating 0-5
ECF = 1.4 − 0.03 × Σ(weight × rating) over 8 environmental factors
Effort (person-hours) = UCP × productivity factor (Karner's default = 20 ph/UCP; 15-30 in practice)
Requirements volatility RV (%) = (added + deleted + modified requirements) / total baselined requirements × 100
Requirements Stability Index RSI (%) = 100 − RV
Traceability coverage (%) = requirements with at least one downstream link / total requirements × 100
Requirement defect density = requirement defects found / (size in 100 requirements, or per function point)
Phase defect removal efficiency DRE (%) = defects found in phase / (found in phase + escaped from phase) × 100
Cost of late fixing (Boehm's rule of thumb) Cost_phase ≈ Cost_requirements × multiplier, multiplier ≈ 1 : 5 : 10 : 20 : 100 for requirements : design : code : system test : production. The multipliers are indicative, not exact, and vary widely by study.

Example 1 — sizing a campus placement portal with Use Case Points. Actors: 2 simple (payment API, SMS gateway) → 2×1 = 2; 3 average (bulk-upload text interface, college ERP feed, email service) → 3×2 = 6; 1 complex (student GUI) → 1×3 = 3. UAW = 11. Use cases: 6 simple → 6×5 = 30; 4 average → 4×10 = 40; 2 complex → 2×15 = 30. UUCW = 100. So UUCP = 111. Technical factors sum to 30 → TCF = 0.6 + 0.01×30 = 0.90. Environmental factors sum to 20 → ECF = 1.4 − 0.03×20 = 0.80. UCP = 111 × 0.90 × 0.80 = 79.9. Effort = 79.9 × 20 ≈ 1,598 person-hours ≈ 10 person-months at 160 h/month. At an internal cost of ₹900/hour, ≈ ₹14.4 lakh.

Example 2 — MoSCoW budget split on the same project. The common DSDM guideline caps Must-haves at about 60% of effort, Should at 20%, Could at 20% (the contingency that gets dropped first). Must ≤ 0.60 × 1,598 ≈ 959 h · Should ≈ 320 h · Could ≈ 320 h. If elicitation produced 1,150 h of Must-have work, the project is already over-committed at baseline and scope must be renegotiated before coding starts.

Example 3 — volatility and stability. Baseline: 240 requirements. Over three sprints: 18 added, 6 deleted, 24 modified → changes = 48. RV = 48/240 × 100 = 20% → RSI = 80%. A 20% volatility in one quarter on a fixed-bid contract is high; each change should have a costed CR. If 222 of the 240 requirements trace to at least one test case, traceability coverage = 222/240 = 92.5%, leaving 18 untested requirements to close.

Example 4 — why requirement reviews pay. A review of those 240 requirements finds 36 defects; 9 more escape and surface in UAT. Requirement defect density = 36 / (240/100) = 15 defects per 100 requirements. Phase DRE = 36/(36+9) × 100 = 80%. Cost: fixing at review ₹2,500 each → 36 × 2,500 = ₹90,000. Had all 36 escaped to UAT at a 20× multiplier (₹50,000 each) → ₹18,00,000. Net saving ≈ ₹17.1 lakh, against a review that cost roughly 40 person-hours.

Example 5 — 100-point prioritisation. Three stakeholders each distribute 100 points over five features:

FeatureHODPlacement officerStudent repTotalRank
Resume upload and parsing253035901
Company drive scheduling303510752
Aptitude mock tests151030553
Analytics dashboard25155454
Alumni referral module51020355

Total points = 300, and the ranking is reproducible and defensible in a steering meeting.

ComparisonFirstSecond
Aggregation vs compositionHollow diamond, shared parts, part can outlive whole (Team–Player)Filled diamond, exclusive ownership, part dies with whole (Order–OrderLine)
«include» vs «extend»Mandatory, base always runs itOptional, runs only if the condition at the extension point holds
Sequence vs communicationTime down the page, best for orderingNumbered messages on links, best for structure
Activity vs state machineFlow of actions, may span many objectsEvent-driven states of a single object
SRS vs product backlogBaselined, signed, change-controlledLiving, re-prioritised each sprint, stories with acceptance criteria
Verification vs validationConformance to the specificationFitness for the actual need
# PlantUML - minimal use case and class fragments
@startuml
left to right direction
actor Student
actor "Payment Gateway" as PG
rectangle "Placement Portal" {
  Student -- (Apply to Drive)
  (Apply to Drive) ..> (Validate OTP) : <<include>>
  (Apply to Drive) <.. (Pay Registration Fee) : <<extend>>
  (Pay Registration Fee) -- PG
}
@enduml

@startuml
class Student {
  - rollNo : String
  - cgpa : Decimal
  + isEligible(d : Drive) : Boolean
}
class Drive
class Application
Student "1" -- "0..*" Application
Drive   "1" -- "0..*" Application
' composition
Drive   *-- "1..*" Round
@enduml

Where it is used

Interview questions

Common mistakes

Related topics

SDLC and Agile · Software architecture: monoliths and microservices · Low-level design (object-oriented design) interviews · Software testing basics · Software project management and estimation · Database design and ER modelling

Open in the Knowledge reader →Find jobs →