0% found this document useful (0 votes)
19 views75 pages

Software Engineering Unit 3 Easy Notes (Edushine Classes)

The document provides an overview of Software Design in Software Engineering, detailing its importance in the Software Development Life Cycle (SDLC) and outlining key concepts such as modularization, architectural design, and design principles. It emphasizes the need for a structured approach to software design, including understanding requirements, defining system architecture, and ensuring maintainability and efficiency. Additionally, it introduces various design techniques like pseudocode and flowcharts to aid in the planning and implementation of software systems.

Uploaded by

hsofficial8907
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views75 pages

Software Engineering Unit 3 Easy Notes (Edushine Classes)

The document provides an overview of Software Design in Software Engineering, detailing its importance in the Software Development Life Cycle (SDLC) and outlining key concepts such as modularization, architectural design, and design principles. It emphasizes the need for a structured approach to software design, including understanding requirements, defining system architecture, and ensuring maintainability and efficiency. Additionally, it introduces various design techniques like pseudocode and flowcharts to aid in the planning and implementation of software systems.

Uploaded by

hsofficial8907
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

Software Engineering (BCS601)

Unit-3 Software Design

Edushine Classes

Follow Us
Download Notes : https://rzp.io/rzp/RmKDvKl
https://telegram.me/rrsimtclasses/
Software Engineering (BCS601)

 What is Software Design ?


• Software design is the process of planning and creating the structure of a software
system before coding. It helps developers understand how different parts of the
software will work together to achieve the desired functionality.
• S/W design is a very important phase in the SDLC. It is a technique through which we
can design a meaningful representation of something that we want to built.
• It is a process by which the requirement (SRS) are translated into blueprint for
creating a s/w.
• The blueprint gives us the complete details of working s/w.
• The design must meet all the user requirements.
• It also reduces effort & errors that come during the design.
• The entire s/w must be breakdown into no. of modules known as "top level design".

- Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

• The required algorithm and data structure is used to implement a particular


module known as detail design.
• The entire s/w designing concept is divided into two parts:
i. Top or high level Design
ii. Detail or internal design
 General Tasks Involved in Software Design
1.Understanding Requirements
• Analyze what the user wants from the software.
• Identify functional (what the software does) and non-functional (performance,
security) requirements.
2.Defining System Architecture
• Decide on layers of the software (Frontend, Backend, Database).
• Select technologies (Java, Python, SQL, etc.).
Software Engineering (BCS601)

3. Breaking into Modules (Modularization)


• Divide the system into small, manageable parts called modules.
• Each module should perform a specific function.
4. Designing Data Flow & Control Flow
Create flowcharts and diagrams to represent how data moves inside the software.
5. Defining User Interface (UI)
• Plan how the user will interact with the system (buttons, forms, navigation).
6. Ensuring Security & Performance
• Implement Best practices to make the software fast, secure, and error-free.
7. Documentation & Review
• Write detailed documentation for future developers.
• Get feedback and improve the design.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)
 Software Design Principles (Best Practices)(IMP)
To make a software efficient, maintainable, and scalable, developers follow design
principles:
i. Modularity
• Break the system into independent modules.
• Example: In an e-commerce website, there are separate modules for User Login,
Product Listing, and Checkout.
ii. Abstraction
• Hide unnecessary details and show only what is needed.
• Example: A banking app only shows "Transfer Money" to users but hides complex
calculations.
iii. Encapsulation
• Keep related data and methods together in a single unit.
• Example: A Car object in code has both speed and fuel level inside it.
Download Notes : https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

iv. Low Coupling & High Cohesion


• Low Coupling: Modules should have minimal dependency on each other.
• High Cohesion: Each module should perform only one specific task.
v. Separation of Concerns
• Divide the software into distinct sections so that each section has a clear
responsibility.
• Example: The Frontend and Backend of a website are separate.
vi. Reusability
• Write code that can be used again in different parts of the software.
• Example: A login system can be used for both students and teachers in a school app.
vii. Scalability
• The software should be designed to handle future growth easily.
• Example: A social media app should be able to support more users over time.
Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

viii. Maintainability
• The software should be easy to update and fix bugs.
• Example: Writing clean and well-documented code.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 Objectives of Software Design (In Simple Words)(Imp)


i. Correctness – The design should work properly and include all required
functionalities.
ii. Efficiency – The design should use less time, cost, and resources to perform tasks
smoothly.
iii. Flexibility – The design should allow easy modifications and updates without
affecting the whole system.
iv. Understandability – The design should be simple and well-structured, making it
easy to read and work with.
v. Completeness – The design should include everything needed (modules, data,
interfaces, etc.).
vi. Maintainability – The design should be easy to fix, improve, and update in the
future without much effort.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)
 Phases of Software Design (IMP)
Software design is divided into three main phases: Architectural Design, Interface
Design, and Detailed Design. Each phase helps in structuring the software properly
before development starts.
1. Architectural Design (High-Level Design)
• Defines the overall structure of the software.
• Decides how different parts (modules) of the system will interact.
• Helps in choosing the best design pattern for development.
✅ Example:
Think of it like building a house—deciding how many rooms, floors, and the connections
between them.
✅ Key Elements:
• Components and their relationships (e.g., database, user interface, backend).
• Architecture styles (e.g., client-server, layered architecture).
•Follow
Technology
U -s selection
R Download
(e.g.,
R S I M TNotes
which programming
CLASSES
languages and frameworks to use).
WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

2. Interface Design
• Focuses on how users and other software components interact with the system.
• Defines the look and feel of the application (UI) and communication rules
between system modules (APIs).
✅ Example:
• Designing buttons, menus, forms for a website.
• Creating APIs that allow different software parts to communicate (e.g., login
system talks to the database).
✅ Key Elements:
• User Interface (UI) – Ensures ease of use and good experience.
• Application Programming Interfaces (APIs) – Ensures smooth interaction
between software modules.
• Error Handling – Ensures user-friendly messages instead of confusing errors.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

3. Detailed Design (Low-Level Design)


• Breaks each module into smaller, more detailed parts.
• Defines how each function, class, or database table will be implemented.
• Helps developers write clear and structured code.
✅ Example:
• Writing detailed algorithms for a login system (e.g., how to check username and
password).
• Designing flowcharts and pseudo-code for better understanding.
✅ Key Elements:
i. Algorithm design (e.g., logic for sorting data).
ii. Data structures (e.g., arrays, linked lists).
iii. Control flow (e.g., loops, conditions, function calls).

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 Architectural Design in Software Engineering:


• Architectural Design is the first step in designing the structure of a software system.
• It is like creating a blueprint of a building before starting construction.
• In software, architectural design shows how the software will be organized, how
different parts will work together, and how data will flow through the system.
• Architectural Design is the high-level structure of the software.
It decides which major parts (modules) the software will have and how they will
interact with each other.
 Why is it Important?
i. It helps in planning the overall system structure.
ii. Makes the system easier to develop, understand, and maintain.
iii. It reduces errors and improves software quality.
iv. It provides a clear roadmap to developers.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 Key Components of Architectural Design


i. Components / Modules
These are like building blocks (e.g., login module, payment module).
ii. Connectors
These are the ways modules communicate with each other (e.g., function calls, APIs).
iii. Data Flow
How data moves from one module to another.
iv. Interfaces
How external systems or users interact with the software.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)
📌 Example:
Let’s say you're building an E-commerce website.
Your architectural design may have these parts:
• User Interface Layer (For customers to see and interact)
• Business Logic Layer (To process orders, payments)
• Database Layer (To store products, orders, users)
• Admin Panel (To manage products, view reports)
These parts (modules) talk to each other using functions or APIs — that’s architectural
design.
i. Types of Architectural Styles (Just Names)
ii. Layered Architecture
iii. Client-Server Architecture
iv. MVC (Model-View-Controller)

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

🔍 Introduction to Low-Level Design (LLD)?


• Low-Level Design is the second stage of software design.
It gives detailed information about each module, functions, classes, and logic of the
software.
• It focuses on how to implement the architecture decided in the High-Level Design
(HLD). 📌 Example:
 If HLD says:
👉 “There will be a login module.”
 Then LLD will explain:
👉 How to write code for login,
👉 What functions to create,
👉 What variables and data structures to use,
👉 And how each part will work internally.
Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 What is Modularity?
• Modularity means dividing the software into small, independent parts called modules.
• Each module does one specific task.
It helps in managing, testing, and updating the software easily.
 Why Modularity is Important?
Imagine writing a program with 1000 lines of code in a single file.
It is Very hard to manage, right? 😓
But if we break it into small parts (modules), it becomes:
i. Easy to understand 👀
ii. Easy to test ✅
iii. Easy to update 🔧
iv. Easy to reuse ♻️

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

💡 Example of Modularity:
• For an online shopping site:
• One module handles login
• One for product search
• One for adding to cart
• One for payment
All these modules work together but are developed separately.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

Properties of Modularity :

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 What is a Structure Chart?


A Structure Chart is a diagram that shows how different modules of a program are
organized and how they interact with each other.
It's used in software design to show the hierarchy (top-down) of modules and sub-
modules.
Think of it like a family tree, but instead of people, it shows functions/modules.
📌 Key Points:
• It shows the main module at the top.
• Below it are sub-modules (functions or parts).
• Shows the flow of data between modules.
• Helps programmers understand the structure before coding.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 Example:
Let’s say we are designing software for an Online Exam System.
Structure Chart:
Online Exam System

Login()
Startexam() ViewResult()

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

Rules for drawing good structure diagram :

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

 What is Pseudocode?
Pseudocode is a way of writing the logic of a program in simple, human-readable
language — without using any specific programming language like Java, C, or Python.
It’s like writing your plan or steps to solve a problem in plain English — just like telling
someone how to cook a recipe step-by-step.
💡 Why Use Pseudocode?
• Easy to understand the logic of the program.
• Helps in planning before coding.
• Can be understood by anyone, even non-programmers.
• Reduces syntax errors before writing real code.
• Great for algorithms, flowcharts, and interviews.

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

- Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

🔍 Example 1: Pseudocode to Find the Sum 🔍 Example 2: Pseudocode to Check Even or


of Two Numbers Odd
START
START INPUT number
INPUT number1 IF number MOD 2 = 0 THEN
INPUT number2 PRINT "Even number"
sum ← number1 + number2 ELSE
PRINT sum PRINT "Odd number"
END ENDIF
END

Follow U -s
R Download
R S I M TNotes
CLASSES WHATSAPP - 9795358008
: https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

💡 What is a Flowchart?
A flowchart is a diagram that shows the step-by-step flow of a process or a
program using symbols and arrows.
It’s like drawing a map of your logic — how your code or work flows from start
to end.

✅ Why Use Flowcharts?


• Makes it easy to understand logic
• Helps in debugging and explaining the program
• Useful in planning and designing code

- Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

- Download Notes : https://rzp.io/rzp/ DtpXaWbv


Software Engineering (BCS601)

💡 What is Coupling?
Coupling means how much one module (part) of a program is dependent on another
module.
If two parts of your program are tightly connected, they are tightly coupled. If they can
work independently, they are loosely coupled — which is better.
✅ Example in Real Life:
Imagine your TV remote and TV:
If the remote only works with one specific TV, they are tightly coupled.
But if the remote can work with any brand of TV, they are loosely coupled.
In programming, we prefer loosely coupled modules, because:
• They are easier to change
• Reusable in other programs
• Easy to test and fix bugs
Download Notes : https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

📚 Types of Coupling (from worst to best):


Let’s go from bad (tight) to good (loose) coupling.
1. Content Coupling (❌ Worst)
One module directly accesses or changes the data of another module.
Like breaking into someone’s room without permission.
Example:
Module A changes variable inside Module B.
2. Common Coupling
Multiple modules share global data.
If one module changes the global data, it affects others.
Example:
Global variable used in many modules.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

3. Control Coupling
One module controls the behavior of another by passing control flags or instructions.
Example:
Module A sends a value to Module B to tell it which task to perform.
4. Stamp Coupling (or Data-Structure Coupling)
Modules share only necessary parts of data structures like objects or records.
Example:
Module A sends a complete student object, but Module B only needs the student’s
name.
5. Data Coupling ✅ (Best)
Modules share only required data through parameters.
Most independent and clean.
Example:
Module A sends just student’s name to Module B which needs only that.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

💡 What is Module Cohesion?


In software design, when we divide a program into small parts or modules, we want
each module to do one specific job.

👉 Cohesion means how tightly related the functions or tasks within a single module
are.

 High cohesion is good! ✅


It means everything in the module is working toward one purpose.
 Low cohesion is bad ❌
It means the module is doing too many unrelated things.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Types of Cohesion (from worst to best) :


1. Coincidental Cohesion (Worst Type)
A module contains completely unrelated tasks. They are just grouped together
randomly.
Example:
A module that:
• Prints a message
• Logs in a user
• Opens a file
These tasks have no connection to each other. This is bad design.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

💡 2. Logical Cohesion
Tasks are logically related, and one is selected using if-else or switch-case.
Example:
A module that handles user requests:
• If choice = 1 → Save file
• If choice = 2 → Print file
• If choice = 3 → Send file
These are logically related (file operations), but still not very cohesive.

3. Temporal Cohesion
Tasks are related by time, meaning they happen together at the same time, like during
start-up or shutdown.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Example:
A module that:
• Opens DB connection
• Loads configuration
• Initializes screen
All tasks happen at program start, but they are not functionally the same.
4. Procedural Cohesion
Tasks are performed in a sequence, step-by-step, but they may not use the same data.
Example:
A module that:
• Checks login credentials
• Loads dashboard
• Sends welcome message

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

5. Communicational Cohesion
Tasks operate on the same data or data structure.
Example:
A module that:
• Reads student details
• Calculates total marks
• Displays result
All actions are done on the same student data, so they are related through
shared data.

6. Sequential Cohesion
The output of one task becomes the input for the next.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Example:
A module that:
• Takes student marks
• Calculates percentage
• Decides pass/fail
Each task depends on the result of the previous one.
7. Functional Cohesion (Best Type)
All tasks in the module work together to do one specific job.
Example:
A module that:
• Takes numbers
• Calculates their average
That’s it. All tasks support one function = calculate average. It’s clear, focused.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

 Software Design Strategy?


A software design strategy is a plan or method used to design a software system in a
structured way.
It helps developers organize, plan, and build software effectively.

Software Design Strategy

Functional Oriented Object Oriented Top –Down Design Bottom- Up Design


Design Design

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

1. Functional Oriented Design Strategies :


In Function-Oriented Design (FOD), the software is broken down into a set of
functions or procedures, where each function performs a specific task. The focus is
on what the software will do—the actions or operations it needs to perform.
This strategy focuses on designing the system based on the functions that the system
needs to perform. The system is organized into small, independent functions that
work together to accomplish the overall task.
Example:
Imagine a Library Management System. You have different functions like:
• SearchBooks()
• IssueBook()
• ReturnBook()
• CalculateFine()
Download Notes : https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

Each of these functions performs one specific task, and they work together to make
the entire system functional.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

2. Object Oriented Design Strategies :


In Object-Oriented Design, the software is designed using objects. These objects
represent real-world entities or concepts. Objects are made up of:
Attributes: Characteristics or data that describe the object.
Methods: Functions or actions that can be performed on the object.
i. Encapsulation: Hiding the internal details of an object and providing controlled
access through methods.
ii. Abstraction: Focusing on essential features and hiding unnecessary complexity.
iii. Inheritance: Reusing functionality by creating subclasses that inherit from parent
classes.
iv. Polymorphism: Allowing one method to behave differently based on the object’s
type (method overloading and overriding).

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

3. Top-Down Design
Top-Down Design means starting from the big picture (main problem) and breaking it
down into smaller and smaller parts until each part is easy to solve.
You first design the overall system, then break it into subsystems, then further into
modules or functions.
🔹 Easy Example:
Let’s say we want to design a website for online shopping.
 Top-Down approach:
Main Goal: Design an online shopping website
Sub-goals:
• User Login/Signup
• Product Search and View
• Add to Cart

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Each of these is then broken down further:


 Login/Signup:
• Take user input
• Verify email and password
• Store session info
 Place Order:
• Select address
• Choose payment method
• Confirm order
So we start with a general overview, and then step-by-step divide it into smaller tasks.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

🔹 Advantages of Top-Down Design:


• Easy to understand and plan.
• Helpful for designing large
systems.
• Easy to find errors at the top
level.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

4. Bottom-Up Design
Bottom-Up Design means starting from the small parts first, then combining them to
build the whole system.
You first design the basic components (functions, classes, modules), then combine them
into subsystems, and finally into the main system.
🔹 Easy Example:
Let’s take the same example: Online shopping website
Bottom-Up approach:
1.Create small building blocks first:
• Module to handle user input
• Module to connect to database
• Module to show product list
• Module to process payment
Download Notes : https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

Then combine these into:


• Login System
• Product Management System
• Cart & Order System
Finally, combine all systems into:
• Complete Shopping Website
So, in Bottom-Up, you first build the small parts and then assemble them into a bigger
system.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

🔹 Advantages of Bottom-Up
Design:
• You can reuse existing modules.
• Useful when basic components
are already available.
• Encourages writing and testing
small working units first.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Measurement & Matrices


🔷 What is Software Measurement?
Software Measurement is the process of assigning numbers or values to different
features or properties of software to quantify them.
👉 It helps us understand how big, how complex, or how efficient the software is.
📌 Example:
• Counting how many lines of code (LOC) are written.
• Measuring how much time is taken to complete a project.
• Checking how many bugs are found in testing.
In short: Measurement is about collecting data.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

🔷 What is Software Metrics?


Software Metrics are formulas or methods that use measurement data to analyze and
improve software quality, performance, and development process.
It helps in decision-making and tracking progress.
📌 Example:
• Cyclomatic Complexity: Measures complexity of code using a formula.
• Function Point (FP): Measures size of software based on functionality.
• Defect Density: Number of bugs per 1000 lines of code.
• In short: Metrics are rules or formulas that use measurement data for analysis.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

🧠 Real-Life Analogy:
Think of building a house:
• Measurement = You measure the bricks (size, weight, count).
• Metric = You use those measurements to decide how strong the wall is or how many
bricks are needed for a floor.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

 Types of Software Metrics (Easy Explanation)


Software metrics are mainly divided into three types:
✅ 1. Product Metrics
✅ 2. Process Metrics
✅ 3. Project Metrics
🔹 1. Product Metrics
These metrics tell us about the quality and features of the software product (code,
design, documentation).
✨ Example:
i. Lines of Code (LOC): Total number of lines in the code.
ii. Size of documentation: Number of pages or words.
iii. Cyclomatic Complexity: Measures how complex the code logic is.
iv. Function Points (FP): Measures the functionality of software based on inputs

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)
outputs, and user actions.
In Simple Words:
It’s like checking the features of a phone—RAM, battery, camera. Here we check
features of software like size, complexity, and structure.
🔹 2. Process Metrics
These metrics tell us about the process of software development—how it is built,
tested, and delivered.
✨ Example:
• Defect Removal Rate: How many bugs were fixed during testing.
• Testing Efficiency: How well the testing process finds bugs.
• Error Rate: Number of errors per phase (design, coding, etc.)
In Simple Words:
It’s like checking how the factory is working—is it fast, accurate, and smooth? In
software, we check how good the development and testing processes are.
Download Notes : https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

🔹 3. Project Metrics
These metrics focus on the overall project management—time, cost, resources, and
people.
✨ Example:
• Total Cost of the project
• Total time taken to complete
• Team productivity (how much work each member is doing)
• Work hours spent on each task

In Simple Words:
It’s like managing a school project—how much time, energy, and resources are being
used.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Q. What are the different techniques to estimate the size of a


program?(V.IMP)
In software engineering, estimating the size of a program helps us predict:
• How much time will it take?
• How many people are needed?
• How much will it cost?
To do this, we use 3 popular techniques:

🔹 1. Lines of Code (LOC)


We count the number of lines in the code (including logic and function lines).
✨ Example:
If your program has 1000 lines of code, the size = 1000 LOC.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)
🔹 2. Function Point (FP) Analysis
This technique measures the functionality of software from the user’s point of view —
not code lines.
It calculates based on:
• Inputs (e.g., forms)
• Outputs (e.g., reports)
• User interactions
• Files accessed
• External systems connected
✨ Example:
If your software has:
• 3 inputs
• 2 outputs
• 1 file access Then a formula gives the total Function Points.
Download Notes : https://rzp.io/rzp/RmKDvKl
Software Engineering (BCS601)

3. Halstead’s Software Science(V.V.IMP)


Halstead’s Software Science is a method to measure a program using the operators and
operands in the code.
👉 Operators:
Symbols like +, -, if, while, return, etc.
👉 Operands:
Variables and constants like x, y, 100, "name".

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

✅ Halstead’s Basic Terms:


Symbol Meaning
n1 Number of unique operators
n2 Number of unique operands
N1 Total number of operators
N2 Total number of operands

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

1. Program Length (N)


📌 Formula:
N = N1 + N2
(= Total operators + total operands)
📌 Meaning:
How long the code is (in terms of symbols used).

2. Program Vocabulary (n)


📌 Formula:
n = n1 + n2
(= Unique operators + unique operands)
📌 Meaning:
How many unique symbols (words) the program has.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

3. Program Volume (V)


📌 Formula:
V = N × log₂(n)
📌 Meaning:
How big the program is in terms of information content.

4. Program Difficulty (D)


📌 Formula:
D = (n1 / 2) × (N2 / n2)
📌 Meaning:
How difficult it is to understand or write the program.

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

5. Effort (E)
📌 Formula:
E=D×V
📌 Meaning:
How much mental effort is needed to write or understand the code.
6. Programming Time (T)
📌 Formula:
T = E / 18
📌 Meaning:
Estimated time (in seconds) to write the program.
(18 is a constant that represents how fast a human works.)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

7. Language Level (L)


📌 Formula:
L=1/D
📌 Meaning:
Higher value = easier language level
Lower value = difficult language

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

👍 Advantages of Halstead’s Metrics


✅ It measures: 👎 Disadvantages of Halstead’s Metrics
• Code complexity ❌ It doesn’t consider:
• Effort required by developers • Code logic or structure (like loops/nesting)
• Time and resources needed • Comments or readability
✅ Useful for: Human understanding of the program
• Code analysis ❌ Only works after code is written (not during
• Predicting bugs, errors, and costs planning)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

 Function Point (FP) Based Measurement?


👉 Function Point is a method used to measure the size of a software based on what it
does for the user — not based on how many lines of code it has.
It answers:
• What work does the software do?
• How many inputs, outputs, user actions, and files are there?

🎯 Why use Function Point?


• To estimate project size
• To plan cost, effort, and time
• Can be calculated before coding begins

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

 What is Cyclomatic Complexity?


Cyclomatic Complexity is a way to measure how complex your program is by checking the
number of decision points (like if, while, for, switch, etc.) in your code.
👉 In simple words:
It tells how many different paths your program can take when it runs.
📌 Why is it important?
• It helps find out how difficult your program is to understand or test.
• The more complex your code, the harder it is to maintain and test.
Cyclomatic Complexity Formula : M = E - N + 2P

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

✨ OR A Simpler Trick:
Count the number of decision points like:
• if
• else if
• while
• for
• case in switch

Then use this formula:


Cyclomatic Complexity = Number of decision points + 1

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Example :
void example() { Decision points:
if (a > 0) { • 1 if
printf("Positive"); • 1 for loop
} else { ✅ Cyclomatic Complexity = 2 + 1 = 3
printf("Non-positive");
}

for (int i = 0; i < 5; i++) {


printf("%d", i);
}
}

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

📜 Properties of Cyclomatic Complexity:

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)
Software Engineering (BCS601)

What is a Control Flow Graph (CFG)?


👉 A Control Flow Graph (CFG) is a diagram that shows how the program flows from
one part to another during execution.
It shows:
• Blocks of code (statements or groups of instructions)
• Arrows between blocks (showing the flow of control)
🔍 In Easy Words:
A Control Flow Graph is like a map of your program that tells:
• Where the program starts
• Where decisions (like if, while) are made
• Which path the program can take next

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

🎯 Purpose of CFG:
• To understand the logic of the program
• To find bugs or unreachable code
• To calculate Cyclomatic Complexity
• To help in white-box testing

Download Notes : https://rzp.io/rzp/RmKDvKl


Software Engineering (BCS601)

Thank You…

- Download Notes : https://rzp.io/rzp/RmKDvKl

You might also like