IITM BS · Software Engineering · Design Week

Software Design — Full Hinglish Notes

Requirements aur UI ban gaye — ab coding se pehle system ka design banana hai. Ye notes lectures (Prof. Sridhar Iyer + Prof. Prajish Prasad), slides, aur transcripts sab combine karke bane hain — saath mein 15 assignment questions answers & explanation ke saath.

Topics: Design Outcomes · Good Design · Coupling & Cohesion · OOD Basics · UML (Class + Sequence) · VeriSIM · Assignment Solutions

01

Software Design kya hai? — Process & 4 Outcomes

Ab tak humne kya kiya tha? Requirements collect kiye, SRS banaya, user stories likhi, aur unke liye UI design kiya. Ab development shuru karne se pehle ek step aata hai — Design.

Definition (yaad rakho, exam mein aata hai): Design is a way of organising the code you will implement and providing a structure to the software system. Matlab — code likhne se pehle ye decide karna ki code kaise organise hoga, kaun se parts honge, aur wo parts aapas mein kaise baat karenge.

RequirementsSRS + User Stories UI Design DESIGN ← is week ka focus Coding Testing…
fig 1 — SDLC mein design ki position: requirements ke baad, coding se pehle

Design process ke 4 Outcomes MUST KNOW

Design process ka output directly code nahi hota — ek intermediate representation hota hai, jiske broadly 4 outcomes hain:

① Components modules

Solution ke modules — functions ka collection + un functions ka shared data. Har module ek well-defined task accomplish karta hai, aur sab milke pura system chalate hain. E.g. Amazon Seller Portal mein: catalogue management, inventory management, payment tracking.

② Interfaces communication

Modules aapas mein kaise communicate karte hain — data exchange ka tarika. Sender aur receiver dono ko pata hona chahiye ki exchanged data ko kaise interpret karna hai.

③ Data Structures storage

Har component ke andar data kaise store hoga — arrays, lists, trees, hash tables etc. E.g. fast search + insert ke liye hash table choose karna = data structure decision.

④ Algorithms logic

Data pe kaun sa logic chalega jisse desired result mile. Data structure pe run hone wala procedure.

Components + Interfaces = High-Level Design = Software Architecture. Architecture decide hone ke baad hi lower-level details (data structures, algorithms) mein jaate hain. Is week ka focus: high-level design ko represent karna (UML se).

Seller Portal example ka flow: User stories (view inventory, track customer feedback…) → common functionalities identify karo → group karke tasks banao (project management week wala concept) → yehi tasks system ke components ban jaate hain.

02

Good Software Design ke Characteristics

Maan lo tumne components aur interfaces bana liye — ab kaise pata ye design achha hai? Lecture mein 4 characteristics diye gaye:

CharacteristicMatlab kya?Kaise ensure / example
CorrectnessKya design system ki functionality sahi implement karta hai?Requirements sahi capture karo — unambiguous, non-conflicting, complete. Tabhi saari functionality design mein aayegi.
EfficiencyResources (time, space/memory, cost) well-managed hain?Framework selection application ke hisaab se — e.g. embedded system ko limited memory mein chalna hota hai; mission-critical vs client-server ka choice.
MaintainabilityCode ko change karna easy hai? (bina scratch se redesign kiye)Requirements change hote rehte hain — release ke baad bhi. New requests, upgrades — existing design/code mein without too much effort changes ho paayein.
UnderstandabilityPuri team design ko follow kar paaye?Agar team samajh na paaye → bugs + higher development & maintenance cost. Is week ke concepts (modularity, UML) understandability ke liye hi hain.
03

Design Modularity — Coupling vs Cohesion

Modular design = problem ko modules mein decompose karna jisme modules ka aapas mein limited interaction ho. Fayda? Har module independently samjha ja sakta hai — understandability ↑, maintainability ↑.

Cohesion within module

Measure of how functions in a module cooperate together to perform a single objective.

High cohesion = module ke saare functions ek hi objective ke liye milke kaam karte hain. Low cohesion = functions alag-alag unrelated cheezein karte hain.

Coupling between modules

Measure of the degree of interaction between two modules.

High coupling = function calls mein large chunks of shared data pass hota hai — not desirable. Low coupling = minimal, clean interaction.

✓ GOOD: High Cohesion, Low Coupling 1 clean interface Module A — functions andar strongly connected ✗ BAD: Low Cohesion, High Coupling Andar connections kam, bahar zyada — large shared data cross ho raha hai GOAL: HIGH COHESION + LOW COUPLING
fig 2 — modular design ka golden rule (reflection spot ka answer: option C)
Lecture ka reflection spot: good design mein High Cohesion + Low Coupling hota hai. Ye combo ratta maar lo — MCQ mein 100% aata hai (Q1, Q3, Q4 sab isi pe hain).
04

Types of Coupling — best se worst tak

Coupling ke types depend karte hain ki modules ke beech kis type ki information share ho rahi hai. Course mein 4 types: Data → Control → Common → Content (best → worst).

BEST (loose) → → WORST (tight) DATA primitive types pass CONTROL flags / switches COMMON global data share CONTENT internals refer karna Mnemonic: "DCCC" — Data sabse Decent, Content sabse Chaotic
fig 3 — coupling ladder: jitna right, utna kharab design

1. Data Coupling BEST

Do modules data-coupled hain agar wo primitive data type (integer, float, character, string) parameter ke through communicate karte hain.

Example: Seller module inventory module ko query karta hai view_inventory(seller_id) — seller_id ek integer/string hai. Simple, clean.

2. Control Coupling

Jab pass kiya gaya data doosre module ke internal logic ko influence karta hai — typically flags aur switches.

Example: Seller module calls perform_actions(OPERATION_FLAG). Flag = 0 → view inventory, 1 → add product, 2 → delete product. Inventory module ka behaviour flag ki value pe depend karta hai.

3. Common Coupling

Do modules commonly coupled hain agar wo global data items share karte hain. E.g. OPERATION_FLAG ko global variable bana do — ab doosre modules bhi usse access kar sakte hain, multiple concurrent changes ho sakte hain → unstable system. Not recommended.

4. Content Coupling WORST

Jab ek module doosre module ke internals ko directly refer kare — e.g. ek module doosre mein branch kar jaaye ya uske internal changes pe depend kare. Python/Java jaise OO languages mein rarely hota hai kyunki data + functions encapsulated hote hain.

TypeKya share hota haiTrigger keyword (MCQ ke liye)Rank
DataPrimitive type parameter (int, float, char)"passing amount / id / value"Best ✓
ControlFlag/switch jo logic control kare"flag ke basis pe different logic"Okay-ish
CommonGlobal variables"global data / shared variable"Bad
ContentDoosre module ke internals"refers to internals / branches into"Worst ✗
05

Types of Cohesion — best se worst tak

Cohesion ke types batate hain ki module ke functions kis basis pe saath rakhe gaye hain. Course order (best → worst): Functional → Sequential → Communicational → Procedural → Coincidental.

FUNCTIONAL single task, sab milke SEQUENTIAL output → next input COMMUNICATIONAL same data structure PROCEDURAL sequence, alag purpose COINCIDENTAL random functions BEST → → WORST Mnemonic: "Full SE Course Padhna Chahiye" → F S C P C
fig 4 — cohesion ladder (course mein yehi 5 covered hain)

1. Functional Cohesion BEST

Module ke different functions ek single specific task complete karne ke liye cooperate karte hain.

Example — Inventory module: view_inventory(), add_item_to_inventory(), delete_item_inventory() — sab inventory management se related. Perfect.

2. Sequential Cohesion

Functions sequence mein execute hote hain — ek function ka output agle ka input banta hai.

Example — Order Processing: create_order()check_availability()place_order(). Note: check_availability() actually product/inventory ko dekhta hai, toh strictly order module ka nahi hai — bas sequence maintain karne ke liye yahan rakha gaya.

3. Communicational Cohesion

Module ke saare functions same data structure ko refer ya update karte hain.

Example: Inventory + catalogue alag rakhne ke bajaye ek hi Product module jisme products ki list hai — add, edit, delete of catalogue AND inventory sab isi mein, same list pe operate karte hue.

4. Procedural Cohesion

Activities sequence se related hain, lekin wo entirely different purposes ke liye kaam karti hain.

Example — ek hi "Seller Portal" module: login → add product to catalogue → add item to inventory → place order → update inventory → logout. Login/logout ka product-add se koi lena dena nahi — ideally alag modules mein hone chahiye the.

Sequential vs Procedural confusion clear karo: Sequential = sequence + related purpose (output→input chain, ek workflow). Procedural = sequence toh hai par functions ke purposes hi alag hain.

5. Coincidental Cohesion WORST

Module mein functions ka aapas mein meaningless relationship hai — bas random cheezein ek jagah daal di. Good designs mein rarely dikhta hai.

06

Object-Oriented Design — Basic Concepts

Ab modules ko represent kaise karein? Course object-oriented design (OOD) approach follow karta hai. Core concepts:

Object kya hota hai?

PRIVATE DATA name, type, cost, size, colour… add_product() edit_product() delete_product() Product object — methods bahar ki ring, data andar locked Encapsulation ke 2 fayde (exam point): 1. High Cohesion — related data + methods ek hi module/object mein saath rehte hain 2. Low Coupling — objects ke beech interaction minimize ho jaata hai (koi object doosre ka data directly access nahi kar sakta)
fig 5 — encapsulation: data hiding se automatically modular design milta hai

Class kya hoti hai?

Class = template for object creation. Similar attributes aur methods wale saare objects milke ek class banate hain. E.g. electronic items, clothes, food items — sab Product type ke objects hain.

07

Class Relationships — 5 types + UML notation

Classes aapas mein 5 tarike se related ho sakti hain. Notation + identification trick dono yaad karo — assignment ke 5 questions (Q7–Q10, Q15) isi pe hain.

1. ASSOCIATION Seller Inventory view_inventory(seller_id) "A needs help from B / A delegates to B" Ek class doosri ke methods invoke karti hai — simple line/arrow 2. AGGREGATION TaskList Task "B is part of A" — HOLLOW diamond whole ki taraf. Weak whole-part: part independently exist kar sakta hai 3. COMPOSITION Catalogue Product "A contains B / A is a collection of Bs" — FILLED diamond. Strong whole-part: products milke catalogue banate hain 4. INHERITANCE Book Product "A is a kind of B / specialisation" — HOLLOW triangle base class ki taraf. Derived class base ke attributes+methods extend karti hai 5. DEPENDENCY Class B Interface A "A change → B bhi change" — dashed arrow. E.g. B implements interface A; A badla toh B ko bhi badalna padega
fig 6 — paanchon relationships ki UML notation ek jagah (diamond kis side hai, ye dhyan rakho — WHOLE ki taraf)

Identification cheat-table SLIDE SE DIRECT

Statement patternRelationship
"A delegates to B" / "A needs help from B" / A calls B's methodAssociation
"B is a part of A" / "A contains B" / "A is a collection of Bs"Composition / Aggregation
"A is a kind of B" / "A is a specialisation of B" / categorised intoInheritance
"A changes → B must change" / B implements interface ADependency
Aggregation vs Composition dono "whole–part" hain. Diamond whole (container) ki side pe lagta hai. Hollow ◇ = aggregation (loose — part akela survive kare, jaise TaskList–Task), Filled ◆ = composition (strong — jaise Catalogue–Product; course example composition ka hai).
08

UML Diagrams — Views, Class Diagram, Sequence Diagram

Software modeling = system ka external explicit representation banana, taaki design team members aur clients ko communicate ho sake. Iske liye most popular notation: UML (Unified Modeling Language). UML system ko multiple views se describe karta hai — user's view, functional view, behavioural view etc. Course focus: 2 views.

UML VIEWS STRUCTURAL VIEW static — classes, data, functions DYNAMIC BEHAVIOURAL VIEW behaviour over time Class Diagram ★ classes, attributes, operations State Machine View object ke different states model karta hai Activity View flow of control among computational activities Interaction View ★ message exchanges ★ = course ke main diagrams: Class diagram + Sequence diagram (interaction view ka type)
fig 7 — UML views ka family tree (Q12 yahin se: flow of control among computational activities = Activity View)

Structural View → Class Diagram

Class diagram static diagram hai — system ki structure dikhata hai: classes, unke attributes, operations/methods, aur objects ke beech relationships. Ye time-dependent behaviour describe nahi karta. Har class box ke 3 compartments:

Product - product_id: Integer - product_name: String - product_cost: Float + add_product(...) + delete_product(p_id) + edit_product(p_id) ① TOP → Class ka NAAM ② MIDDLE → ATTRIBUTES (data members) "-" prefix = private data ③ BOTTOM → OPERATIONS (methods) "+" prefix = public methods
fig 8 — class box anatomy: naam | attributes | operations

Seller portal example: ProductCatalogue ke beech composition (products milke catalogue), aur Clothing/Book classes Product base class se inherit karti hain (Book = product + author, publisher, pages jaise extra attributes).

Behavioural View → Sequence Diagram

Interaction view ka most important type. Ek user story / requirement ka behaviour implement karta hai — objects ke beech message exchanges ki sequence dikhakar.

User AddSeller UI Controller Seller enter seller details addSeller(id, name…) addSeller(id, name…) SUCCESS SUCCESS seller added ✓ ← boxes on top = objects/classes ← dashed vertical = LIFELINES Horizontal arrows = MESSAGES (order of occurrence, top→bottom) · messages = class diagram ke functions
fig 9 — sequence diagram anatomy ("add seller" user story ke liye)
Terminology exact yaad karo (Q11 isi pe pakadta hai): Vertical parallel/dashed lines = lifelines (messages NAHI). Horizontal arrows = messages (lifelines NAHI). Top ke rectangular boxes = objects/classes. Aur jo function jis class pe call ho raha hai (arrow jis lifeline pe land karta hai), wo function us class mein defined hona chahiye.
Purpose of UML: design ko communicate karna — team + clients ko. Class aur sequence diagrams sabse commonly used hain design process mein; baaki UML diagrams extra resources mein hain.
09

VeriSIM — Design Tracing se UML samajhna

VeriSIM = Verifying designs by SIMulating scenarios. Ek learning environment jisse tum class + sequence diagrams ka integrated understanding develop karte ho.

Context: Automated Door Locking System

Requirements example: user passcode enter karke register karta hai; lock/unlock option choose karta hai. "Unlock option + correct passcode → door unlocks; incorrect passcode → door locked rehta hai." Ye requirements class diagram + kai sequence diagrams se model hote hain.

Design Tracing Strategy

Given scenario ke liye ek state diagram construct karna. Isme:

door = LOCKED option = none door = LOCKED option = UNLOCK door = UNLOCKED ✓ option = UNLOCK select unlock correct passcode Transitions ← sequence diagram ke messages · State variables ← class diagram — dono ka integrated use!
fig 10 — design tracing: scenario ko state diagram mein convert karna

VeriSIM ki 4 Activities/Stages

1 · Introduction (kya hai, learning objectives) 2 · Problem Understanding (requirements + design diagrams milte hain) 3 · Design Tracing (challenges — any order mein attempt) 4 · Reflection (kya seekha)

Har activity ke baad evaluations aur reflection activities bhi hoti hain.

10

Assignment — saare 15 Questions solved & explained

Har question ke saath: correct answer highlighted + Hinglish explanation + kaunsa concept test ho raha hai. Explanation kholne ke liye "Samjho kyun" pe click karo.

Q1 · 1 markCohesion basics

When all the functions in each module of a software system perform a single objective, then the modules ________.

  • A.Have high cohesion
  • B.Have low cohesion
  • C.Are highly coupled
  • D.Are lowly coupled
Samjho kyun → A

Cohesion ki definition hi yehi hai — module ke functions milke single objective perform karein = high cohesion. Coupling ka yahan zikr hi nahi (wo modules ke beech ki baat hai), toh C/D out. "Single objective" keyword dikhe → seedha high cohesion.

Q2 · 1 markGood design characteristics

A software design process has ensured that the changes to the software will be easy to implement even after the product has been released. Which characteristic of good software design is ensured?

  • A.Correctness
  • B.Efficiency
  • C.Maintainability
  • D.Understandable
Samjho kyun → C

"Changes easy to implement even after release" — ye word-to-word maintainability ki definition hai (lecture: "new requests can come even after the product is released… design should be maintainable"). Correctness = functionality sahi, Efficiency = resources, Understandability = team samjhe. Change/modify keyword = maintainability.

Q3 · 1 mark · MSQCoupling + Cohesion (figures)

Figures mein modules (M1–M5) hain, arrows = interactions. Figure 1: tree-jaisa clean structure (kam arrows). Figure 2: same modules, but bahut saare cross arrows. Select reasons that make Figure 1 a better design than Figure 2.

  • A.Figure 1 shows higher coupling than Figure 2
  • B.Figure 1 shows lower coupling than Figure 2
  • C.Modules in Figure 1 are highly cohesive compared to Figure 2
  • D.Modules in Figure 2 are highly cohesive
Samjho kyun → B, C

Arrows = module interactions = coupling. Figure 1 mein kam arrows → lower coupling → better. Kam external interaction ka matlab har module apna kaam khud handle kar raha hai → higher cohesion. Good design mantra: high cohesion + low coupling — Figure 1 dono satisfy karta hai.

Q4 · 1 markCoupling basics

When function calls between two modules involve passing a large chunk of shared data, then the modules ________.

  • A.Have high cohesion
  • B.Have low cohesion
  • C.Are highly coupled
  • D.Are lowly coupled
Samjho kyun → C

Lecture ki exact line: "high coupling means function calls between two modules involve passing large chunks of shared data — and this is not desirable." Do modules ke beech ki baat = coupling (cohesion nahi), aur large shared data = high coupling.

Q5 · 1 markCoupling types

Food delivery app: order module payment module ko payable amount (floating point type) pass karke payment initiate karta hai. Identify the type of coupling.

  • A.Content coupling
  • B.Common coupling
  • C.Control coupling
  • D.Data coupling
Samjho kyun → D

Float = primitive data type, parameter ke through pass ho raha hai → data coupling (best type). Ye flag nahi hai (logic control nahi kar raha → control ✗), global nahi hai (common ✗), internals refer nahi ho rahe (content ✗).

Q6 · 1 markCoupling types

E-commerce app: order module delivery module ko ek flag pass karta hai (regular vs priority customer). Flag value ke depending pe delivery module different internal logic execute karta hai. Identify the coupling type.

  • A.Content coupling
  • B.Common coupling
  • C.Control coupling
  • D.Data coupling
Samjho kyun → C

Do giveaways: (1) "flag" word, (2) "depending on flag value, different internal logic" — passed data receiver ke internal logic ko influence kar raha hai = control coupling ki textbook definition (OPERATION_FLAG example jaisa). Note: flag technically primitive hota hai, but jab wo logic control kare toh data coupling nahi, control coupling hai.

Q7 · 1 markClass relationships

Library Management System: objects of Novel class are categorised into two classes — Fiction and Nonfiction. Identify the relationship between Novel and, Fiction & Nonfiction classes.

  • A.Association
  • B.Composition
  • C.Inheritance
  • D.Dependency
Samjho kyun → C

"Categorised into" = Fiction is a kind of Novel, Nonfiction is a kind of Novel — specialisation → inheritance. Novel = base class; Fiction/Nonfiction = derived classes (jaise Product → Books/Clothing wala example). Part-whole nahi hai (composition ✗), sirf method-call help nahi hai (association ✗).

Q8 · 1 markClass relationships

Online food delivery: diagram mein Customeradd_product(prod_id, quantity) ─→ Order. Identify the class relationship type.

  • A.Association
  • B.Composition
  • C.Inheritance
  • D.Dependency
Samjho kyun → A

Customer object, Order class ka method invoke kar raha hai (add_product) — "A needs help from B / A delegates to B" pattern → association. Notation bhi simple arrow hai (na diamond, na triangle, na dashed). Seller→Inventory view_inventory(seller_id) wale example ka mirror hai.

Q9 · 1 mark · MSQClass diagram reading

Class diagram: User ──→ TaskList (plain arrow); TaskList ◆── Task (diamond); TimeBoundTask ──▷ Task (hollow triangle). Which statements are true?

  • A.There is an association relation between User and TaskList
  • B.There is an inheritance relation between User and TaskList
  • C.There is a composition relation between Task and TaskList
  • D.There is an inheritance relation between Task and (TaskList)
Samjho kyun → A, C

Notation decode karo: User→TaskList plain arrow = association (User register karke tasklist use karta hai). TaskList ke side diamond + tasks: List<Task> attribute = TaskList is a collection of Tasks → composition (whole-part). Aur TimeBoundTaskTask pe hollow triangle = inheritance wahan hai (Task–TaskList ke beech nahi). Diamond dikha toh composition/aggregation, triangle dikha toh inheritance — bas symbols padhne ka game hai.

Q10 · 1 markClass diagram banana

Pen seller app: Catalogue comprises one or more objects of Pen class; Pen objects further classified as FountainPen, BallPen, GelPen. Correct class diagram?

  • A.(galat arrangement)
  • B.Catalogue ◇── Pen ◁── {GelPen, BallPen, FountainPen}
  • C.Pen ── Catalogue ◇── {…} (ulta arrangement)
Samjho kyun → B

Do relationships identify karo: (1) "Catalogue comprises Pen objects" = whole-part → diamond Catalogue (whole) ki side pe, Pen ki taraf line. (2) "Pen objects further classified as FountainPen/BallPen/GelPen" = inheritance → triangle Pen (base class) ki taraf, teeno derived classes usse point karti hain. Option B mein dono sahi direction mein hain. C mein containment ulta hai (Pen contains Catalogue — galat).

Q11 · 1 mark · MSQSequence diagram

Food delivery app — "add a restaurant" user story ka sequence diagram (User → AddRestaurant UI → Controller → Restaurant, with addRestaurant(id, name, address) messages). Correct statements?

  • A.The classes are represented as rectangular boxes at the top (User, Controller etc.)
  • B.The vertical parallel lines represent the message exchanges in order
  • C.The horizontal arrows are known as lifelines
  • D.The function addRestaurant must be defined in the Controller class as well as in the Restaurant class
Samjho kyun → A, D

Terminology swap trap hai ye! Sahi mapping: top boxes = classes/objects ✓ (A sahi). Vertical dashed lines = LIFELINES (messages nahi → B galat). Horizontal arrows = MESSAGES (lifelines nahi → C galat). D sahi kyunki addRestaurant message UI→Controller pe bhi call hota hai aur Controller→Restaurant pe bhi — jis object ki lifeline pe arrow land karta hai, wo method us class mein defined hona chahiye — matlab dono classes mein.

Q12 · 1 markBehavioural views

In which of the following diagram models is the flow of control among computational activities?

  • A.Class diagram
  • B.State machine diagram
  • C.Activity view
  • D.Interaction view
Samjho kyun → C

Slide definition word-to-word: Activity view — models flow of control among computational activities. Compare: State machine = object ke states; Interaction = message exchanges; Class diagram = static structure. Teeno behavioural views ki one-liners ratta maarna zaroori hai (fig 7 dekho).

Q13 · 1 markDesign outcomes

You need to store a list of active users with fast search and insertion. You decide to use a hash table. Which design decision are you addressing?

  • A.Algorithm
  • B.Component
  • C.Data Structure
  • D.Interface
Samjho kyun → C

Design ke 4 outcomes yaad karo: components, interfaces, data structures, algorithms. "Data kaise store hoga" (hash table, array, tree…) = data structure decision. Algorithm hota agar data pe chalne wala procedure choose kar rahe hote; component hota agar module define karte; interface hota agar modules ka communication decide karte.

Q14 · 1 markDesign quality

Developer ko authentication password-based se OTP-based change karna hai, lekin current code tightly coupled hai aur modify karna difficult hai. Kaunsi design quality lacking hai?

  • A.Maintainability
  • B.Correctness
  • C.Efficiency
  • D.Understandability
Samjho kyun → A

"Difficult to modify/change" = maintainability ki kami. Notice: tight coupling ↔ poor maintainability — yehi reason hai ki hum low coupling chahte hain. Code galat nahi chal raha (correctness ✗), resources ka issue nahi (efficiency ✗), samajhne ka issue primary nahi (understandability ✗) — issue change karne ka hai.

Q15 · 1 mark · MSQRelationships combo

University system: (i) A Course contains multiple Student objects. (ii) A Course uses a GradingService to assign grades. (iii) A Professor is a kind of Employee. Correctly identified set?

  • A.Aggregation, Association, Inheritance
  • B.Composition, Association, Aggregation
  • C.Composition, Aggregation, Inheritance
  • D.Inheritance, Association, Composition
Samjho kyun → A

Teen statements, teen patterns:

(i) Course contains Students → whole-part. Students course ke bina bhi exist karte hain (independently) → weak containment = Aggregation (composition hota toh part whole ke saath hi jeeta-marta).

(ii) Course uses GradingService = "A needs help from B" = Association.

(iii) Professor is a kind of Employee = specialisation = Inheritance.

Order match: Aggregation, Association, Inheritance → Option A.

11

Last-minute Revision Sheet

ConceptOne-liner (bas itna yaad rakho)
DesignCode ko organise karne + structure dene ka tarika (coding se pehle)
4 outcomesComponents · Interfaces · Data Structures · Algorithms (C-I-D-A)
ArchitectureComponents + Interfaces = high-level design
Good designCorrectness · Efficiency · Maintainability · Understandability
CohesionModule ke ANDAR — functions ek single objective ke liye cooperate karein (high chahiye)
CouplingModules ke BEECH interaction ka degree (low chahiye)
Coupling orderData < Control < Common < Content (best → worst)
Cohesion orderFunctional > Sequential > Communicational > Procedural > Coincidental
EncapsulationData + Methods bundle → data hiding → high cohesion + low coupling free mein
Association"A needs help from B" — plain line/arrow
Aggregation"B part of A" (weak) — HOLLOW ◇ whole ki side
Composition"A collection of Bs" (strong) — FILLED ◆ whole ki side
Inheritance"A is a kind of B" — hollow triangle ▷ base class ki side
Dependency"A badla → B badlo" (interface impl.) — dashed arrow
Class diagramStructural/static: Name | Attributes | Operations (3 compartments)
Sequence diagramEk user story ka behaviour: boxes = objects, vertical dashed = lifelines, horizontal arrows = messages
State machine viewObject ke states model karta hai
Activity viewFlow of control among computational activities
Interaction viewMessage exchanges ki sequence (sequence diagram iska type)
VeriSIMVerifying designs by SIMulating scenarios — design tracing se state diagram banao (states ← class diagram, transitions ← sequence diagram)
Ek line mein pura week: "Requirements se components banao, unhe high-cohesion low-coupling modules mein organise karo, aur class + sequence diagrams se represent karo."