Unit 3 Sofware Engineering
Unit 3 Sofware Engineering
1. Purpose:
Software design ka mukhya uddeshya hai ek blueprint taiyar karna software ke development
ke liye.
Isme software ke architecture, modules, interfaces, aur algorithms ka design kiya jata hai.
2. Key Concepts:
a. Abstraction: Software design mein abstraction ka use kiya jata hai jisse complex systems ko
simplified manner mein represent kiya ja sake.
b. Modularity: Software ko modular components mein divide kiya jata hai taki unhe alag-alag
modules mein develop kiya ja sake aur maintenance aur scalability ko improve kiya ja sake.
c. Encapsulation: Data aur functions ko ek single unit mein encapsulate kiya jata hai jise classes ya
modules kaha jata hai. Isse data hiding aur code reusability achieve hoti hai.
d. Coupling and Cohesion: Design mein low coupling aur high cohesion ki principles ko follow
kiya jata hai, jisse modules ke beech ki dependencies minimize hoti hai aur module ke internal
components related aur interconnected hote hain.
e. Hierarchy: Software design mein hierarchical structure ka use kiya jata hai jahan par modules ko
hierarchically organize kiya jata hai layers ke roop mein, jaise ki presentation layer, business logic
layer, aur data access layer.
f. Patterns: Software design mein design patterns ka use kiya jata hai jo common software design
problems ko solve karne ke liye standardized solutions provide karte hain, jaise ki Singleton,
Factory, aur Observer patterns.
3. Process:
a. Requirement Analysis: Sabse pehle, user ke requirements ko analyze kiya jata hai taki unhe
design mein incorporate kiya ja sake.
b. Architectural Design: High-level architecture ko define kiya jata hai, including major
components, modules, aur interfaces.
c. Detailed Design: Low-level design kiya jata hai jismein modules ke internal structure, algorithms,
aur data structures ko define kiya jata hai.
d. Validation: Design ko stakeholders ke saath validate kiya jata hai taki koi inconsistencies ya
issues ko identify aur rectify kiya ja sake.
5. Benefits:
Software design ke through software development process streamline hoti hai aur
development time aur cost kam hota hai.
High-quality software architecture ko ensure kiya jata hai jisse scalability, maintainability,
aur reusability improve hoti hai.
Design ke saath stakeholders ke collaboration ko improve kiya jata hai taki unki requirements
ko accurately incorporate kiya ja sake.
Software design ek critical phase hai software development process ka jahan par software ke architecture aur
structure ko plan kiya jata hai. Ek well-designed software architecture quality, performance, aur
maintainability ko ensure karta hai.
Architectural Design
Architectural design software development ka ek important phase hota hai jahan par system ka
high-level structure design kiya jata hai. Is stage mein, developers aur architects software ka
blueprint banate hain jo development team ko guidance provide karta hai.
Architectural design, software ke high-level structure ko define karta hai. Yeh batata hai ki system
ke different components (like modules, classes, and functions) kaise interact karenge aur kis tarah
se system ke goals achieve honge. Architectural design system ke major components aur unke
relationships ko diagrammatically represent karta hai.
1. Modules: Yeh software ke different parts hote hain jo specific functionality provide karte
hain. Example: User authentication module.
2. Components: Yeh modules ke bhi smaller parts ho sakte hain. Example: Login form,
Registration form.
3. Interfaces: Yeh define karte hain ki components aapas mein kaise communicate karenge.
Example: API endpoints.
4. Data Flow: Yeh batata hai ki data ek component se doosre component mein kaise move
karta hai.
5. Control Flow: Yeh define karta hai ki control ek part se doosre part mein kaise transfer hota
hai.
Chalo ek online shopping system ka example lete hain. Is system mein following modules ho sakte
hain:
Diagram Explanation
sql
Copy code
+-----------------+ +-----------------+ +-----------------+ | User Module |<--->| Product Module |<--->| Cart Module |
+-----------------+ +-----------------+ +-----------------+ ^ ^ | | | v +-------------------------+ +-----------------+ | | Order Module |
| +-----------------+ v ^ +-----------------+ | | Admin Module |<--------------+ +-----------------+
User Module: Users register, login, and manage their profiles. Yeh module Product aur Cart
modules se interact karta hai.
Product Module: Yeh products ki listing, detail view aur search functionality manage karta
hai. User module aur Cart module se connected hai.
Cart Module: Users products ko cart mein add karte hain aur cart ko update karte hain. Yeh
Order module se bhi interact karta hai.
Order Module: Users checkout karte hain, payment process hoti hai aur order history ko
manage karta hai. Admin module se bhi connected hai.
Admin Module: Admins product management, user management aur order management
karte hain. Yeh other modules ko control aur monitor karta hai.
Conclusion
Architectural design software development ka crucial step hai jo system ke overall structure ko
define karta hai. Yeh design development team ko clear vision provide karta hai aur ensure karta
hai ki system efficiently aur effectively develop ho sake.
I hope yeh detailed explanation aur example aapke liye useful raha hoga. If you need any more
information or specific details, feel free to ask!
Benefits of Modularization
1. Manageability: Chhote modules ko manage karna easy hota hai compared to a large
monolithic system.
2. Reusability: Ek baar bana hua module dusre projects mein reuse kiya ja sakta hai.
3. Parallel Development: Different modules ko alag-alag teams parallelly develop kar sakti
hain, jo development speed increase karta hai.
4. Maintainability: Bugs fix karna aur new features add karna easy ho jata hai, kyunki changes
ko isolated modules tak restrict kiya ja sakta hai.
5. Scalability: System ko scale karna easy ho jata hai, kyunki individual modules ko
independently scale kiya ja sakta hai.
Diagram Explanation
Library Management System ka modular structure kuch aisa dikh sakta hai:
sql
Copy code
+-----------------+ +-----------------+ +-----------------+ | User Module |<--->| Book Module |<--->| Loan Module | +-----------------
+ +-----------------+ +-----------------+ ^ ^ | | | v +-------------------------+ +-------------------+ | | Notification Module| v
+-------------------+ +-----------------+ | Admin Module | +-----------------+
Module Details
User Module:
Book Module:
Notification Module:
Functionality: Sending reminders for due dates, notifications for new arrivals.
Interactions: User Module (user contact details), Loan Module (due dates).
Admin Module:
Conclusion
Modularization software development ko organized, efficient, aur maintainable banati hai. Har
module apna specific role play karta hai aur independent development aur testing ko allow karta
hai. Is approach se development teams ko flexibility milti hai aur overall system ka quality aur
reliability improve hota hai.
I hope yeh explanation aapko clear understanding provide karti hai modularization ke importance
aur implementation ke baare mein. Agar aapko aur details chahiye, feel free to ask!
Design Structure Charts ek hierarchical diagram hote hain jo software system ke modules aur unke
sub-modules ko dikhate hain. Yeh chart top-down approach follow karta hai, jahan top-level
module ya main function se start karke niche ke sub-modules aur functions ko show kiya jata hai.
Online Shopping System ka simplified structure chart kuch aisa dikh sakta hai:
sql
Copy code
Main Module | +-- User Management Module | | | +-- Register User | +-- Login User | +-- Manage Profile | +-- Product
Management Module | | | +-- List Products | +-- Search Products | +-- Product Details | +-- Order Management Module | |
| +-- Manage Cart | +-- Checkout | +-- Order History | +-- Admin Module | +-- Manage Products +-- Manage Users +--
Generate Reports
1. Main Module:
5. Admin Module:
Conclusion
Design Structure Charts software system ka ek clear aur organized view provide karte hain. Yeh
charts help karte hain development team ko system ke different parts aur unke interactions ko
visualize karne mein, jo ki system ko design, develop, aur maintain karne mein helpful hota hai. Is
se development process streamlined hota hai aur modules ke beech dependencies ko samajhna
easy ho jata hai.
I hope yeh explanation aapko Design Structure Charts ke baare mein clear understanding provide
karti hai. Agar aapko aur details chahiye ya kisi specific part par aur information chahiye, feel free
to ask!
Pseudo Codes
Pesudo code ka use kiya jata hai programming logic ko describe karne ke liye, bina actual
programming language syntax use kiye. Yeh ek simple aur informal tareeka hai jo developers aur
designers ke beech communication ko improve karta hai.
Pesudo code ek informal programming language hota hai jo human-readable hota hai. Yeh actual
programming language syntax se alag hota hai, lekin logic aur steps ko clearly represent karta hai.
Developers pesudo code ka use karke algorithm ya program ka high-level structure define karte
hain.
Chalo ek pesudo code example dekhte hain Bubble Sort algorithm ke liye:
vbnet
Copy code
Pesudo Code: 1 . Start 2 . Loop over the array from index 0 to n- 1 3 . Inside the loop , again loop over the array from index
0 to n-i- 1 4 . Compare each pair of adjacent elements 5 . If the current element is greater than the next element, swap them
6 . Repeat steps 2 - 5 until the array is sorted 7 . End
1. Clarity: Pesudo code clear aur concise hota hai, jo logic ko samajhne mein madad karta hai.
2. Language Agnostic: Kisi bhi specific programming language ki dependency nahi hoti, isliye
developers ko apni preferred language mein implement karne mein flexibility milti hai.
3. Communication: Pesudo code ki madad se developers aur designers ke beech
communication improve hoti hai, kyunki sabko clear understanding hoti hai logic ka.
Conclusion
Pesudo code ek powerful tool hai jo developers ko algorithm aur program ka logic define karne
mein madad karta hai. Isse development process streamline hoti hai aur clarity bani rehti hai code
ke design mein.
Mujhe ummeed hai ki yeh pesudo code ke baare mein samjhane wala explanation aapke liye
helpful hoga. Agar aapko aur kisi specific concept ke baare mein jaanna hai, toh bataiye!
Flow Charts
Flow charts ek graphical representation hai jo algorithms, processes, ya systems ke steps aur unke
interrelationships ko display karta hai. Yeh ek powerful tool hai jo developers aur designers ko
logic aur flow ko visualize karne mein madad karta hai.
Flow chart ek diagram hota hai jo different shapes aur arrows ka use karta hai, jisse steps ko
represent kiya jata hai. Har shape ek specific meaning ko indicate karta hai, jaise operations,
decisions, aur input/output.
1. Terminal (Start/End): Is shape se flow chart ka execution start hota hai aur yeh bhi
execution end hoti hai.
2. Process: Is shape se koi specific operation ya task ko represent kiya jata hai.
3. Decision: Is shape se conditional statements aur decisions ko represent kiya jata hai, jahan
par kisi condition ka evaluation hota hai.
4. Input/Output: Is shape se input aur output operations ko indicate kiya jata hai.
5. Connector/Arrow: Arrow se flow ka direction aur connection indicate kiya jata hai.
Example: Simple Addition Program
1. Visual Representation: Flow charts graphical format mein logic ko present karta hai, jo use
karne walo ko clear understanding deta hai.
2. Easy to Understand: Ismein steps aur unke interrelationships ko easily samjha ja sakta hai.
3. Effective Communication: Developers aur designers ke beech communication ko improve
karta hai.
4. Problem Solving: Complex problems ko step-by-step solve karne mein madad karta hai.
Conclusion
Flow charts ek effective tool hai software design mein jo logic aur processes ko visualize karne
mein madad karta hai. Yeh clarity aur understanding provide karta hai code ke logic aur execution
flow ko lekar.
Mujhe ummeed hai ki yeh flow charts ke baare mein samjhane wala explanation aapke liye helpful
hoga. Agar aapko aur kuch jaanna hai, toh poochhiye!
Coupling yeh batata hai ki ek module ya component kisi doosre module ya component se kitna
tightly connected hai. Yani ki ek component ki change dusre components par kitna asar dalta hai.
Agar components tightly coupled hain, toh ek component ki change dusre components ko bhi
affect kar sakti hai.
Measures of Coupling:
1. Low Coupling: Components ke beech kam dependencies hona, taki agar ek component
mein kuch change kiya jaye to dusre components par kam asar pade.
2. High Coupling: Components ke beech zyada dependencies hona, jisse agar ek component
mein kuch change kiya jaye to dusre components par zyada asar pade.
Measures of Cohesion:
1. High Cohesion: Ek module mein included elements ka similar purpose hona aur module ke
andar ka interaction zyada hona.
2. Low Cohesion: Ek module mein included elements ka purpose alag-alag hona aur module
ke andar ka interaction kam hona.
Example:
Imagine hum ek banking application ka low-level design kar rahe hain. Hum ek module ko design
kar rahe hain jo user ka account balance check karta hai.
High Coupling Example: Agar hum user account balance check karne ke liye is module
mein directly database se connection establish karte hain, toh agar database schema
change ho jaye to is module ko bhi modify karna padega. Isse, yeh module database
component se tightly coupled hoga.
Low Coupling Example: Agar hum user account balance check karne ke liye ek separate
"Database Access" module ka use karte hain, jisme database se connection establish hoti
hai aur result ko return karta hai, toh agar database schema change ho jaye to sirf
"Database Access" module ko hi modify karna padega. Isse, "Account Balance Check"
module database component se loosely coupled hoga.
High Cohesion Example: Ek module jo user account balance check karta hai, sirf user
account related tasks ko handle karta hai jaise ki balance check, transaction history retrieve
karna, aur funds transfer karna. Yeh sabhi tasks account management ke related hain aur
isliye yeh module ka cohesion high hoga.
Low Cohesion Example: Agar is module mein aur bhi tasks jaise ki user authentication aur
user profile management include kiye jayein, jo user account balance check se directly
related nahi hain, toh iska cohesion low hoga.
Conclusion:
Coupling aur cohesion important concepts hain jo software design mein code quality aur
maintainability ko influence karte hain. Low coupling aur high cohesion ke saath design ki gayi
modules aur components maintainable, reusable, aur scalable hoti hain.
Mujhe ummeed hai ki yeh explanation aapko coupling aur cohesion ke concept samajhne mein
madad karega. Agar aur kuch poochna ho toh poochiye!
Design Strategies:
Function Oriented Design
Function Oriented Design ek software design strategy hai jisme focus primarily functions (ya
subroutines) par hota hai jo specific tasks ko perform karte hain. Is approach mein, software ko
chhote-chhote functions mein divide kiya jata hai jo specific operations ko execute karte hain.
Function Oriented Design mein, har function ek specific task ko handle karta hai. Yeh functions ko
reusable aur independent banane ki koshish karta hai, jisse code ka reusability aur maintainability
increase hota hai. Har function ek specific input leta hai, usko process karta hai, aur phir ek output
produce karta hai.
Example:
Chalo ek simple calculator application ko Function Oriented Design ke through samjhte hain:
1. Reusability: Har function ko alag-alag tasks ke liye reuse kiya ja sakta hai.
2. Modularity: Code ko chhote modules mein divide karke, code ko organize karna aasan
hota hai.
3. Maintenance: Har function ko separately maintain kiya ja sakta hai, jisse overall code
maintenance easy hota hai.
4. Testing: Functions ko alag-alag test kiya ja sakta hai, jisse testing process streamline hoti
hai.
5. Scalability: New functions ko add karna aur existing functions ko modify karna easy hota
hai.
Conclusion:
Function Oriented Design ek effective approach hai jo software ko modular, reusable, aur
maintainable banata hai. Is approach mein focus functions par hota hai jo specific tasks ko perform
karte hain, aur isse code ka structure clear aur organized rehta hai.
Mujhe ummeed hai ki yeh explanation aapko Function Oriented Design ke concept ko samajhne
mein madad karega. Agar koi aur sawaal ho toh poochhiye!
Object Oriented Design mein, har object ek specific entity ko represent karta hai. Har object apne
data (attributes) aur behavior (methods/functions) ko encapsulate karta hai. Is approach mein,
inheritance, polymorphism, aur encapsulation jaise OOP concepts ka use kiya jata hai.
Example:
Chalo ek simple banking application ko Object Oriented Design ke through samjhte hain:
1. Account Object: Ek class jo ek bank account ko represent karta hai, jisme account holder ka
naam, account number, aur balance store hota hai. Is class mein functions hote hain jaise ki
deposit aur withdraw.
2. Transaction Object: Ek class jo ek transaction ko represent karta hai, jisme transaction type
(debit/credit), amount, aur timestamp store hota hai.
Conclusion:
Object Oriented Design ek powerful approach hai jo real-world entities ko software mein represent
karne mein madad karta hai. Is approach mein, software ko objects ke form mein organize kiya jata
hai, jisse code modular, reusable, aur maintainable banata hai.
Mujhe ummeed hai ki yeh explanation aapko Object Oriented Design ke concept ko samajhne
mein madad karega. Agar koi aur sawaal ho toh poochhiye!
Top-Down Design:
Top-Down approach mein, hum system ke high-level modules ya components ko pehle design
karte hain, phir unhe further detail mein divide karte hain. Is approach mein, hum system ko ek
bird's-eye view se dekhte hain aur uski top-level functionality ko define karte hain.
1. System Analysis: Sabse pehle, hum system ke requirements aur functionalities ko analyze
karte hain. Yeh hume system ke high-level structure ko define karne mein madad karta hai.
2. High-Level Design: Is stage mein, hum system ke top-level modules aur unke interactions
ko design karte hain. Yeh modules system ke primary functionalities ko represent karte hain.
3. Detailed Design: High-level modules ko further detail mein divide kiya jata hai. Har module
ko uske sub-modules mein divide kiya jata hai, aur in sub-modules ka detail design kiya jata
hai.
Bottom-Up Design:
Bottom-Up approach mein, hum pehle chhote components ya modules ko design karte hain, phir
unhe integrate karke larger systems banate hain. Is approach mein, hum detail-level se shuruwat
karte hain aur phir unhe combine karke system ko build karte hain.
1. Component Design: Sabse pehle, hum chhote components ya modules ko design karte
hain. Yeh components system ke small functionalities ya tasks ko represent karte hain.
2. Integration: Design kiye gaye components ko integrate kiya jata hai aur unhe larger
systems mein combine kiya jata hai. Is stage mein, components ko ek cohesive manner
mein integrate kiya jata hai.
3. System Design: Integrated components se badi systems ko design kiya jata hai. Yeh stage
system ke overall structure ko define karta hai.
1. Incremental Development: Chhote components ko pehle design karke phir unhe integrate
karne se, incremental development hoti hai.
2. Early Testing: Chhote components ko individually test karke unki functionality ko early
stage mein verify kiya ja sakta hai.
3. Flexibility: Chhote components ko alag-alag modules mein design karne se, code ko reuse
aur modify karne mein flexibility milti hai.
Conclusion:
Top-Down aur Bottom-Up dono hi design strategies mein apni unique advantages hain. Top-
Down approach mein, hum system ko high-level se define karte hain, jabki Bottom-Up approach
mein hum detail-level se shuruwat karte hain. Har strategy ka selection project ke requirements aur
complexity par depend karta hai.
Mujhe ummeed hai ki yeh explanation aapko Top-Down aur Bottom-Up design strategies ke
beech ke farq samajhne mein madad karega. Agar koi aur sawaal ho toh poochhiye!
Software Measurement:
Software measurement ka aim hota hai quantitative data collect karna software development
process aur uske outcomes ke baare mein. Is process mein, various attributes jaise ki size,
complexity, effort, aur quality ko measure kiya jata hai. Yeh measurements project planning,
estimation, aur tracking mein helpful hote hain.
Software Metrics:
Software metrics ek quantitative measure hota hai jo software development process ya product ke
quality, performance, aur efficiency ko evaluate karta hai. Yeh metrics software engineering
processes aur products ke various attributes ko assess karne mein madad karte hain.
1. Code Coverage: Code ke percentage ko measure karta hai jo automated tests cover karte
hain.
2. Bug Fix Rate: Ek specific time period mein fix kiye gaye bugs ka rate ko measure karta hai.
3. Response Time: Software ke performance ke liye average response time ko measure karta
hai.
4. Customer Satisfaction Score: End users ke satisfaction level ko measure karta hai.
1. Quality Assurance: Software metrics quality assurance process ko support karte hain aur
defects ko identify karne mein madad karte hain.
2. Process Improvement: Metrics development process ko evaluate karte hain aur areas of
improvement ko identify karne mein help karte hain.
3. Decision Making: Measurements aur metrics project planning, resource allocation, aur risk
management mein decision making ko guide karte hain.
4. Performance Evaluation: Metrics performance evaluation ke liye quantitative data provide
karte hain, jisse performance improvements ka path clear hota hai.
Conclusion:
Software Measurement and Metrics ek crucial part hai software development process ka jo
quantitative data collect karta hai aur software ke various aspects ko assess karta hai. Yeh process
aur metrics project success aur quality assurance mein important role play karte hain.
Mujhe ummeed hai ki yeh explanation aapko Software Measurement and Metrics ke concept ko
samajhne mein madad karega. Agar koi aur sawaal ho toh poochhiye!
Various Size Oriented Measures: Halestead’s Software Science
Halestead’s Software Science ek software measurement technique hai jo software complexity,
effort, aur productivity ko quantify karne ke liye develop ki gayi hai. Is technique ko Maurice
Howard Halstead ne 1977 mein introduce kiya tha. Chaliye is technique ko samajhne ki koshish
karte hain:
Halestead’s Software Science ek mathematical model hai jo software ke complexity aur size ko
measure karta hai, jisse development effort aur time estimate kiya ja sakta hai. Is approach mein,
chand basic parameters ka use kiya jata hai:
1. Operators (N1): Unique operators ki count ko represent karta hai. Operators kuch bhi ho
sakte hain jaise arithmetic operators, logical operators, assignment operators, etc.
2. Operands (N2): Unique operands ki count ko represent karta hai. Operands variables,
constants, functions, ya keywords ho sakte hain.
3. Total Operators (n1): Total operators ki count ko represent karta hai. Yeh total occurrences
of all operators ko count karta hai.
4. Total Operands (n2): Total operands ki count ko represent karta hai. Yeh total occurrences
of all operands ko count karta hai.
Halestead’s Software Science ke dwara software ki complexity aur size ko calculate karne ke liye
kuch formulas ka use hota hai:
1. Program Length (N): Program ki length ko calculate karne ke liye is formula ka use kiya
jata hai: 𝑁=𝑁1+𝑁2N=N1+N2
2. Program Vocabulary (n): Program mein use kiye gaye unique elements ki count ko
calculate karne ke liye is formula ka use kiya jata hai: 𝑛=𝑛1+𝑛2n=n1+n2
3. Volume (V): Software ki volume ko calculate karne ke liye is formula ka use kiya jata hai.
Volume program ki size aur complexity ko measure karta hai: 𝑉=𝑁∗𝑙𝑜𝑔2(𝑛)V=N∗log2(n)
4. Difficulty (D): Software ki difficulty level ko measure karne ke liye is formula ka use kiya
jata hai. Difficulty higher level of complexity ko represent karta hai:
𝐷=(𝑁1/2)∗(𝑛2/𝑁2)D=(N1/2)∗(n2/N2)
5. Effort (E): Software development effort ko estimate karne ke liye is formula ka use kiya jata
hai. Effort total operator aur operand counts par depend karta hai: 𝐸=𝑉∗𝐷E=V∗D
Conclusion:
Halestead’s Software Science ek powerful technique hai software size, complexity, effort, aur
productivity ko quantify karne ke liye. Is technique ka use karke, software development process ko
better plan aur manage kiya ja sakta hai.
Mujhe ummeed hai ki yeh explanation aapko Halestead’s Software Science ke baare mein acchi
samajh provide karega. Agar aur kuch poochna ho toh poochhiye!
Function Point ek standardized unit hai jo software ke functional size ko measure karta hai. Is
technique mein, software ke different functions ya features ko quantify kiya jata hai aur unhe
function points mein convert kiya jata hai.
Function Point ko calculate karne ke liye, kuch basic steps follow kiye jate hain:
1. Identify Functions: Sabse pehle, software ke various functions ya features ko identify kiya
jata hai. Yeh functions user ke requirements aur use cases ke according define kiye jate hain.
2. Assign Complexity: Har function ko complexity level assign kiya jata hai. Complexity level
ko alag-alag factors jaise ki inputs, outputs, inquiries, aur files ke saath associate kiya jata
hai.
3. Calculate Unadjusted Function Points (UFP): Har function ke complexity level ko multiply
karke unadjusted function points ko calculate kiya jata hai.
4. Adjustment Factors: Is stage mein, kuch adjustment factors ka use kiya jata hai jaise ki
technical complexity, user interface complexity, aur reusability ko consider karke function
points ko adjust kiya jata hai.
5. Calculate Adjusted Function Points (AFP): Unadjusted function points ko adjustment
factors ke saath multiply karke adjusted function points ko calculate kiya jata hai.
1. Subjectivity: Function Point calculation mein complexity ke assign karne mein subjectivity
ka issue ho sakta hai.
2. Learning Curve: Is technique ko sahi tareeke se implement karne ke liye training aur
expertise ki zarurat hoti hai.
3. Dependency on Requirements: Function Point calculation user ke requirements aur use
cases par depend karta hai, jisse accurate calculation ke liye clear requirements ki zarurat
hoti hai.
Conclusion:
Function Point (FP) Based Measures ek valuable technique hai software ke functional size ko
measure karne aur effort estimation karne ke liye. Is technique ke use se software development
process ko better plan aur manage kiya ja sakta hai.
Mujhe ummeed hai ki yeh explanation aapko Function Point (FP) Based Measures ke baare mein
acchi samajh provide karega. Agar aur kuch poochna ho toh poochhiye!
Cyclomatic Complexity code ke control flow ko quantify karta hai. Yeh technique code mein
present decisions aur loops ki complexity ko evaluate karta hai. Cyclomatic Complexity ko "V(G)"
ya "CC" se represent kiya jata hai.
Cyclomatic Complexity ko calculate karne ke liye, hum control flow graph banate hain jisme
vertices decisions aur loops ko represent karte hain aur edges code ke flow ko represent karte
hain. Phir hum is graph ka Cyclomatic Complexity calculate karte hain.
1. Vertices (V): Vertices decisions aur loops ko represent karte hain. Agar code mein "if"
statement hai toh ek vertex add hota hai. Agar code mein "while" loop hai toh ek aur vertex
add hota hai.
2. Edges (E): Edges code ke flow ko represent karte hain. Agar ek decision ya loop ke baad ek
aur statement execute hoti hai toh ek edge add hota hai.
3. Cyclomatic Complexity (V(G)): Cyclomatic Complexity vertices aur edges se calculate kiya
jata hai. Iska formula hota hai: 𝑉(𝐺)=𝐸−𝑉+2𝑃V(G)=E−V+2P Yahan, 𝑃P loops ko
represent karta hai.
Kam Complexity: Cyclomatic Complexity ka kam value simplicity aur readability ko represent
karta hai.
Uchit Complexity: Cyclomatic Complexity ka moderate value uchit complexity ko indicate
karta hai.
Zyada Complexity: Cyclomatic Complexity ka high value code ki complexity ya readability
issues ko indicate karta hai.
Conclusion:
Cyclomatic Complexity ek valuable software quality metric hai jo code ki complexity ko measure
karta hai. Is technique ka use karke, developers code ki readability, maintainability, aur testability
ko improve kar sakte hain.
Mujhe ummeed hai ki yeh explanation aapko Cyclomatic Complexity ke baare mein acchi samajh
provide karega. Agar aur kuch poochna ho toh poochhiye!
Control Flow Graph ek directed graph hota hai jo code ke control flow ko represent karta hai. Isme
nodes (vertices) aur edges hote hain jisme nodes statements ko represent karte hain aur edges
unke execution flow ko represent karte hain.
1. Nodes (Vertices): Har statement ko ek node ke roop mein represent kiya jata hai. Yeh
statements include karte hain: conditions (if, else if, else), loops (for, while), aur regular
statements.
2. Edges: Har statement ke baad ka execution flow ko represent karne ke liye edges add kiye
jate hain. Agar ek statement ke baad dusri statement execute hoti hai toh unke beech ek
edge hota hai.
3. Entry aur Exit Points: Graph ka ek entry point hota hai jahan se code ka execution shuru
hota hai, aur ek exit point hota hai jahan se code ka execution khatam hota hai.
1. Visual Representation: CFD code ke control flow ko visually represent karta hai, jisse code
ke flow ko samajhna aasan hota hai.
Example:
Is graph mein:
Conclusion:
Control Flow Graph (CFD) ek powerful technique hai jo code ke control flow ko visualize karta hai
aur Cyclomatic Complexity jaise metrics ko calculate karne mein madad karta hai. Is technique ka
use karke, developers code ki complexity ko analyze kar sakte hain aur code quality ko improve kar
sakte hain.
Mujhe ummeed hai ki yeh samjhaane wala explanation aapko Control Flow Graphs ke baare mein
acchi samajh provide karega. Agar aur kuch poochna ho toh poochhiye!