Software Engineering

Created by
BBorhan
Last edited time
Tag
Year 3 Term 2

Resources


  1. Slide from ma’am (https://github.com/borhan008/academic_files/tree/main/3-2/5.%20Software%20Engineering%20and%20Information%20System%20Design/Slides)
  1. Atkia apu’s note
  1. Mahir Labib Dihan sir’s note,(https://drive.google.com/file/d/1d_XuqXV4zqYAv8yN8puBCQNll_zcw1jl/view)
  1. Diagrams
    1. https://www.studocu.com/en-us/document/fairleigh-dickinsonuniversity/digital-marketing-strategies/dfd-case-study-with-solutionsupdated/77995749
    1. https://sadamutmspace.blogspot.com/2015/06/meet-4-exercise-on-dfd-read-casebelow.html



Software Engineering is an engineering branch associated with development of software product using well-defined scientific principles method and procedure.

AspectsSoftware EngineeringSystem Engineering
DefinitionSoftware Engineering is an engineering branch associated with development of software product using well-defined scientific principles method and procedure.System engineering isa an interdisciplinary field that focuses on integrating and managing complex system.
ScopeFocuses on software componentsHolistic approach to entire system
ObjectiveTo develop, maintain and improve software productTo ensure system functionality and integrating various parts
MethodScrum, Agile, DevopsMBSE
DeliverableSoftware ApplicationFully functional system
ApplicationIT and Software IndustryBroad application in aerospace, automobile
Stakeholder InteractionSoftware users, developers and IT PersonalsA broader range of stakeholders from various fields
AspectSoftwareProgram
DependencySoftware is mainly dependent on the operating system.Programs are mainly dependent on the compiler.
CategoriesVarious software categories include application software, system software, computer programming tools, etc.There are no such categories of programs.
SizeThe size of software generally ranges from megabytes (Mb) to gigabytes (Gb).The program size generally ranges from kilobytes (Kb) to megabytes (Mb).
Developer ExpertiseSoftware is usually developed by people having expert knowledge and experience as well as are trained in developing software and are also referred to as software developers.Programs are usually developed by the person who is a beginner and has no prior experience.
NatureSoftware's can be a program that generally runs on computer.Programs cannot be a software.
Necessity for Computer FunctionalityIf software's are not present in computers, then computer is useless.If programs are not present in computer, then also computer can function well because of operating system.
DownloadSoftware's can be downloaded on computer using internet without any need of program.Program cannot run on computer without any software present in computer.
FeaturesFeatures of software includes security, safety, dependability, correctness, etc.Features of program includes reliable, cost effectiveness, maintainability, profitability, etc.
Development TimeIt requires more time to create software than program.It requires less time to create program than software.
ExamplesExamples of software includes Adobe Photoshop, Google Chrome, PowerPoint, Adobe Reader, etc.Examples of program includes Web browsers, word processors, video games, etc.

A software process framework is a collection of task sets.

Common Activities in software processes

Generic Process model activities

Types of process pattern:

  1. Task Pattern : Problems associated with a software engineering action or work task and relevant to successful SE proactive are defined by task pattern. Example: Requirement gathering.
  1. Stage pattern: problems associated with a framework activity for a process are described by stage pattern. Example : Establishing communication
  1. Phase Pattern: Phase pattern defines the sequence of framework activities that occur with the process, even the overall of activities are iterative in nature. Example : Spiral Model or Prototyping

Template for describing process pattern

  1. Pattern name: meaningful
  1. Intent : Objectives
  1. Pattern type:
  1. Initial Context : pre-requisite or conditions
  1. Problems :
  1. Solution:
  1. Resulting context
  1. Related pattern
  1. Known uses & example

Example from GFG:

Pattern Name: Prototyping Model Design

Intent: Requirements are not clear. So aim is to make an model iteratively to solidify the exact requirements.

Type: Phase Pattern

Initial Context: Before going to the prototyping these basic conditions should be made

1. Stakeholder has some idea about their requirements i.e. what they exactly want

2. Communication medium should be established between stakeholder and software development team to ensure proper understanding about the requirements and future product

3. Initial understanding about other factors of project like scope of project, duration of project, budget of project etc.

Problem: Identifying and Solidifying the hazy and nonexistent requirements.

Solution: A description of the prototyping should be presented.

Resulting Context: A prototype model which can give a clear idea about the actual product and that needs to be agreed by stakeholder.

Related Patterns: Requirement extraction, Iterative design, customer communication, Iterative development, Customer assessment etc.

Known Uses & Examples: When stakeholder requirements are unclear and uncertain, prototyping is recommended.

Software Development Life Cycle (SDLC) consists of the following seven stages:

  1. Planning: Identify the problem, assess the need for a new or alternative system, set project scope, and create a detailed project plan.
  1. Requirement Analysis: Gather and prioritize business requirements through collaboration between users and IT specialists.
  1. Design: Create technical blueprints including architecture and system models to outline how the system will function.
  1. Implementation: Convert design documents into actual code by building the architecture, database, and programs.
  1. Integration & Testing: Ensure the system meets business requirements through defined test conditions and system testing.
  1. Deployment: Distribute the system to users, provide training, and implement using methods like parallel, plunge, pilot, or phased approach.
  1. Maintenance: Provide ongoing support, fix bugs (corrective), adapt to changes (adaptive), and improve performance (perfective).

Explain how both the waterfall model of the software process and the prototyping model can be accommodated in the spiral process model. (5)

the spiral process model accommodates the waterfall model by breaking it into iterative phases and accommodates the prototyping model by allowing for the creation and refinement of prototypes in each iteration.

The waterfall model can be accommodated in the spiral process model by having each iteration represent a phase of the waterfall model. For example, the first iteration could focus on requirements gathering and analysis, the second on design, the third on implementation, and so on.

Similarly, the prototyping model can be accommodated by using the spiral model's iterative nature to create and refine prototypes in each iteration, incorporating user feedback and refining the prototype until it evolves into the final product.

Steps
i. The first loop may result in the development of a basic prototype of the final product.
ii. The subsequent loops may result in the gradual development of more mature versions of the product.
iii. This spiral continues until an acceptable software product is built and delivered to the client.

Principle: Some changes frequently bring business motivation for working sustainably through simple self-reflection

  1. Customer Satisfacton
  1. Welcome changing requirement
  1. frequently derliverable
  1. business and developer together
  1. supportive and motivative environemtn
  1. face to face conversation
  1. working software is the progree
  1. sustainable developement
  1. technical power and good design
  1. simplicity
  1. self organized team, best architecture, design
  1. the team reflects how to become more effective

Basic activity of XP programming

  1. XP planning : user-stories, cost and create a release plan, delivary date, progress velocity after first increment
  1. XP Design : KISS, CRC card, refactoring
  1. Coding : Pair programming, unit test
  1. Testing : Unit test, Acceptance test

Industrial XP :

SCRUM

Requirements analysis involves understanding what the system should do, how it interacts with other systems, and what limitations or constraints exist.

Phases of Requirements Engineering

"I Enjoy Every New Software Version"

PhasePurpose
InceptionAsk basic questions to understand: - the problem - who needs the solution - the expected solution - communication effectiveness
ElicitationGather requirements from all stakeholders (users, customers, developers, etc.)
ElaborationBuild detailed models to capture: - data requirements - functional requirements - behavioral requirements
NegotiationPrioritize and resolve conflicts among requirements. Agree on a feasible version of the system
SpecificationRepresent requirements using: - written documents - models - mathematical formulas - use-cases - prototypes"Write More Formally Using Prototypes”
ValidationReview the requirements to find: - errors or misunderstandings - Clarification needed - unclear or missing information - inconsistencies - unrealistic/conflicting expectations"Every Cat Might Ignore Rain”

🗂️ Types of Requirements

TypeExplanation
Business RequirementsHigh-level goals, objectives, and needs of the organization.
Stakeholder RequirementsExpectations and needs of each stakeholder group (users, customers, etc.).
Solution RequirementsSpecific features and functions that the system must include.
Functional RequirementsWhat the system should do (features, user interactions, business rules).
Non-Functional RequirementsQualities the system should have (performance, security, reliability, etc.). Also called quality attributes.
Transition RequirementsRequirements needed for moving from the current system to the new one (e.g., data migration, training).

Functional Requirements

🔹 Definition:

Functional requirements describe how the system should behave under specific conditions. They define features, actions, and rules that the system must implement.

🔹 Key Characteristics:

🔹 Examples of Functional Requirements:

Non-Functional Requirements (NFRs)

🔹 Definition:

Non-functional requirements define the quality attributes of a system. They focus on how well the system performs, rather than what it does.

🔹 Key Characteristics:

🔹 Examples of Non-Functional Requirements:

CategoryExamples
PerformanceResponse time, throughput, resource utilization
CapacityData volume the system must handle
AvailabilityUptime percentage or hours
ReliabilityFrequency of failure or errors
RecoverabilityAbility to restore from failures
MaintainabilityEase of making updates
ServiceabilityEase of system support
SecurityData protection and access control
RegulatoryLegal or industry compliance
ManageabilityEase of system monitoring and management
EnvironmentalConstraints based on the operating environment
Data IntegrityAccuracy and consistency of stored data
UsabilityUser-friendliness and interface design

Elements of the Analysis Model

🔹 1. Scenario-Based Elements

TypeExplanation
FunctionalNarratives describing software functions
Use-CaseInteractions between an actor and the system

🔹 2. Class-Based Elements

🔹 3. Behavioral Elements

🔹 4. Flow-Oriented Elements

Use Cases

🔹 Definition:

A use case describes the interaction between a user (actor) and the system to achieve a specific goal.

🔹 Main Components:

ElementDescription
ActorsUsers or systems that interact with the system. They can be primary or secondary.
SystemBehaviors/functions the system must support.
GoalsThe purpose of the interaction (what the actor wants to achieve).

🔹 Actor Types:

Actor TypeRole
PrimaryInitiates the use case, interacts directly with the system (left side of the diagram).
SecondarySupports the system, used by the system but doesn’t initiate interaction (right side of the diagram).

🔹 Representation Formats:


The Unified Modeling Language (UML) is a standardized visual modeling language used in software engineering to specify, visualize, construct, and document the artifacts of a software system.

1. Activity Diagram

Definition: An activity diagram is a type of UML diagram that illustrates the dynamic aspects of a system by showing the workflow of control from one activity to another. It emphasizes the sequence and conditions for coordinating lower-level behaviors.

Purpose: To model the flow of control in a system, often used to describe the steps in the execution of a use case.

Key Points:


2. Sequence Diagram

Definition: A sequence diagram describes the interaction between objects in a sequential order. It shows how objects communicate with each other through messages over time.

Purpose: To represent how different parts of the system interact in a particular scenario.

Key Components:

Use:

Types of message


3. Data Flow Diagram (DFD)

Definition: A DFD is a graphical representation that illustrates the flow of data through a system. It depicts how input is turned into output through a sequence of transformations.

Main Parts:

Supporting Elements:


4. Data Dictionary

Definition: A data dictionary is a centralized repository that contains metadata about the data (i.e database) in the system, including definitions, relationships, sources, usage, and formats.

Purpose: To standardize definitions and facilitate consistency and communication among stakeholders.

The data dictionary in general contains information about the following:

Advantages:

Types:

Four Categories of Data Dictionary:

  1. Data Flows: Collection of data elements. Data flow is a collection of data elements
  1. Data Structures: Groups of elements. Usually algebraic notations
  1. Data Elements: Basic unit of data with specific definition. Data elements definitions describe a data type.
  1. Data Stores: Data stores are created for each different data entity being stored.

✅ 1. Class Model

A class model is a conceptual representation that describes the structure and behavior of objects within a software system. It defines:


✅ 2. Data Modeling

Data modeling is the process of analyzing data objects without considering the processes acting upon them. It focuses on:

It creates a conceptual view of data that reflects how the end-users perceive it.


✅ 3. Data Object

A data object is a representation of any composite information required by the software. It can be:

A data object only encapsulates data — it does not define operations or behaviors.

✅ 4. Attributes

Attributes are descriptors or properties that define the characteristics of a data object.

Example:


✅ 5. Relationship

A relationship represents the connection between two or more data objects. It describes how objects are associated or interact with one another.

Example:


✅ 6. ERD (Entity Relationship Diagram)

An ERD is a graphical notation used to illustrate data objects (entities), their attributes, and the relationships between them. It includes:


✅ 7. Class-Based Modeling

Class-based modeling represents:

Key elements include:


✅ 8. Identifying Analysis Classes

To identify candidate classes from requirements:


✅ 9. Manifestations of Analysis Classes

Analysis classes may take the form of:

TypeExample
External EntitiesUsers, hardware devices
ThingsReports, signals, documents
Occurrences/EventsTransactions, triggers
RolesManager, customer, admin
Organizational UnitsDepartment, team
PlacesFactory floor, loading dock
StructuresSensor, vehicle, table

✅ 10. Criteria for Potential Classes

CriterionDescription
Retained InformationThe class must retain data necessary for system operation
Needed ServicesIt must support relevant operations (methods)
Multiple AttributesMust have more than one meaningful attribute
Common AttributesAll instances share the same set of attributes
Common OperationsSimilar operations applicable to all instances
Essential RequirementsEssential for communication between system and external entities

✅ 11. Defining Attributes

Attributes are assigned depending on the context of the class in the system.

Example:


✅ 12. Defining Operations

Operations represent the behavior of a class. They are identified by parsing verbs from the requirements.

Four Categories:

  1. Data Manipulation (add, update, delete)
  1. Computation (calculate salary, total marks)
  1. Inquiry (check status)
  1. Event Monitoring (detect threshold breach, motion detection)

✅ 13. CRC Models (Class-Responsibility-Collaborator)

CRC (Class-Responsibility-Collaborator) modeling uses index cards to document:

This method helps visualize how classes interact and what responsibilities they carry.


✅ 14. Class Types

TypePurpose
Entity ClassRepresents core domain concepts (e.g., Sensor, FloorPlan)
Boundary ClassManages user interface (e.g., forms, reports)
Controller ClassCoordinates operations, workflows, and communication between classes

✅ 15. Responsibilities


✅ 16. Collaborations

Classes fulfill their responsibilities either:

Types of relationships:


✅ 17. Associations and Dependencies

TermExplanation
AssociationA structural relationship (e.g., student enrolls in courses)
DependencyA situation where one class relies on another to perform a task or supply data

✅ 18. Multiplicity

Specifies the number of instances that can be involved in a relationship:


✅ 19. Analysis Packages

To organize a large model, related classes and use-cases are grouped into packages.

Visibility symbols:

Project Planning

Project Planning is an organized process from requirements gathering to testing and support.

Software Project Manager

Managing People

Managing Projects

Project Planning Process

  1. Identify Stakeholders Need: meet the expectations of stakeholders
  1. Identify Project Objectives: specific, measurable, achievable objectives
  1. Deliverable and due dates: fixed date and time that an objective is due, deliverables = products, service or result
  1. Project Schedules: project start and end date
  1. Provide Roles and Responsibilities: effective communication, who is involved and their task, understand expected objective
  1. Identify Project budget: anticipating budget cost, monitoring budget
  1. Identify Communication Plan: effective communicate with client, team and others
  1. Provide tracking and management: deliver project on time and organize task, track productivity and growth of project

Resource used in Project Management

  1. Human
  1. Reusable Components
  1. Hardware and Software tools

Project Scope Management

Scope = set of deliverables or features of a project

Scope management = creates boundaries of the project by clearly defining what would be done and what not

Steps

  1. Plan Scope Managements : documentarian and guidelines of project scope, product scope, project life, how to define, validate and control.
  1. Collect Requirements: collect requirements from all stakeholders
  1. Defining Scope: identifying project objectives, goals, tasks, budget, resources, schedule, expectation
  1. Create WBS: Work Breakdown Structure = subdividing project deliverables into smaller units, break down into phases, including priority task
  1. Validate Scope: focuses on mainly customer acceptance, customer gives feedback
  1. Control Scope: monitoring the status of the project and managing changes

WBS : Work Breakdown Structure

A top-down hierarchical decomposition of the total project scope into manageable sections.

Working of WBS Steps

  1. Project managers decide project name at top
  1. Project managers identifies the main deliverables of the project
  1. These main deliverables are broke down into smaller higher-level tasks
  1. Process is done recursively to produce much smaller independent task
  1. Choose task owner. they need to get the job down

Components

  1. WBS Dictionary: Document that defines the various wbs element
  1. WBS levels: determines the hierarchy level of a wbs elemet
  1. Task : main deliverable tasks
  1. Sub tasks: devided tasks
  1. Control account : group work packages and measure their status
  1. project deliverables: desired outcome of project tasks and work package

Project Scheduling

Definition: The process of converting a project plan into an operating timetable.

Project scheduling is responsible activity of project manager.

Process:

  1. Identify all the functins required
  1. \Break down large function into smaller activites , wbs
  1. Determine the dependency among various activities
  1. Allocate resources to activities
  1. Assign people to conduct different activities
  1. Plan the beginning and ending dates for different activities
  1. Create activity network and bar or gratt chart

Techniques:

  1. CPM :

    The Critical Path Method (CPM), also known as Critical Path Analysis (CPA), is a project management technique that identifies the longest sequence of tasks (the critical path) that must be completed on time to finish the project, highlighting tasks that directly impact the project's timeline

Lecture 10: Risk Management in Software Projects


Introduction

Risk management is a critical component of software project planning, aimed at identifying, analyzing, and controlling risks to ensure project success. A risk is an uncertain future event with a probability of occurrence and potential for loss, impacting time, budget, performance, or project outcomes.

Sources of Risk

Risks in software projects arise from various sources, including:

Risk Identification

Risk identification involves detecting potential risks early to minimize their impact. Techniques include:

Types of Risks

  1. Technology Risks: Issues with hardware or software used in development.
  1. People Risks: Challenges related to team members, such as turnover or skill gaps.
  1. Organizational Risks: Problems stemming from the organizational environment.
  1. Tools Risks: Issues with development tools or support software.
  1. Requirement Risks: Risks from changing or mismanaged customer requirements.
  1. Estimation Risks: Errors in estimating resources, time, or costs.

Risk Analysis and Prioritization

Risk analysis assesses identified risks by:

  1. Identifying Problems: Determining the root causes of risks.
  1. Estimating Probability: Calculating the likelihood of occurrence.
  1. Assessing Impact: Evaluating the potential effect on the project.

Probability Categories

Risk Control

Risk control involves planning, monitoring, and resolving risks to achieve desired project outcomes.

1. Risk Planning

Risk planning develops strategies to mitigate significant risks. Methods include:

2. Risk Monitoring

Risk monitoring is an ongoing process to track project progress and evaluate risks:

3. Risk Resolution

Risk resolution ensures risks are managed within acceptable levels:

RMMM Plan

The Risk Mitigation, Monitoring, and Management (RMMM) Plan is a structured approach integrated into the overall project plan. It documents risks using a Risk Information Sheet (RIS), which includes:

Example: Late Project Delivery

Risk: Project delivery exceeds the deadline.

  1. Mitigation:
    • Estimate development time as 20 days but quote 30 days to the client for buffer.
    • Implement precautionary measures before development starts.
  1. Monitoring:
    • Create a project schedule with clear start and end dates.
    • Track progress within the 20–30-day window.
  1. Management:
    • If the deadline is missed, negotiate with the client for extra time or offer additional features to maintain satisfaction.

Risk Mitigation

Risk mitigation is a proactive approach to avoid risks before they occur. Steps include:

  1. Communicate with staff to identify potential risks.
  1. Eliminate causes of risks (e.g., unclear requirements).
  1. Develop policies to ensure project continuity.
  1. Regularly review and control project documents.
  1. Conduct timely reviews to accelerate progress.

Risk Management

Risk management is a reactive approach applied after risks materialize:

Example Scenario

Risk: High staff turnover.

Drawbacks of RMMM

While effective, the RMMM approach has limitations:

Conclusion

Effective risk management in software projects involves identifying, analyzing, and controlling risks through proactive mitigation and reactive management. The RMMM Plan provides a structured framework to document and address risks, but it requires careful planning and resources. By understanding risk sources, types, and control strategies, project managers can enhance the likelihood of successful project outcomes.

Lecture 11 : Design Concepts


Introduction

Software design is the process of transforming user requirements into a form suitable for coding and implementation. As the first step in the Software Development Life Cycle (SDLC), it shifts focus from the problem domain to the solution domain, specifying how to fulfill requirements outlined in the Software Requirements Specification (SRS). Software design is typically performed by software design engineers or UI/UX designers.

Mitch Kapor’s Software Design Manifesto

Mitch Kapor, creator of Lotus 1-2-3, emphasized three qualities of good software design:

Objectives of Software Design

A well-designed software system should achieve:

Software Quality Attributes (FURPS)

The FURPS model defines key quality attributes for software design:

Software Quality Guidelines

To ensure high-quality design, the following guidelines should be followed:

Software Design Process

The software design process translates the analysis model (requirements) into a design model (solution) and consists of three levels:

  1. Interface Design:
    • Focuses on interactions between the system and users/devices.
    • Uses scenario-based and behavioral diagrams (e.g., use case diagrams).
    • Does not address internal structure.
  1. Architectural Design:
    • Defines major system components, their responsibilities, properties, interfaces, and interactions.
    • Uses class-based and flow-based diagrams (e.g., class diagrams, data flow diagrams).
  1. Detailed Design:
    • Specifies internal elements of major components, including properties, relationships, processing, algorithms, and data structures.

The design must:

Fundamental Design Concepts

Software design concepts provide the principles and logic behind creating effective software designs. These concepts form a supporting structure for development.

1. Abstraction

Abstraction hides unnecessary implementation details, showing only essential information to users.

2. Architecture

Architecture defines the overall structure of program modules and their interactions, providing conceptual integrity.

3. Design Patterns

Design patterns are reusable solutions to common design problems.

4. Separation of Concerns

Separation of concerns divides complex problems into smaller, independently solvable pieces.

5. Modularity

Modularity divides a system into smaller, manageable parts (modules) to reduce complexity.

6. Information Hiding

Information hiding ensures modules only share necessary information, hiding internal data structures and algorithms.

7. Functional Independence

Functional independence is achieved through modules with single-minded functions and minimal interaction (low coupling, high cohesion).

8. Refinement

Refinement is a top-down approach that elaborates procedural details hierarchically until programming language statements are reached.

9. Aspects

Aspects represent cross-cutting concerns—requirements that affect multiple parts of the design.

10. Refactoring

Refactoring improves a software system’s internal structure without altering its external behavior [FOW99].

Object-Oriented (OO) Design Concepts

OO design leverages principles to create flexible, reusable designs:

Design Model Elements

The design model transforms the analysis model into a detailed implementation plan, encompassing:

  1. Data Elements:
    • Data structures derived from the data model.
    • Database architecture for persistent storage.
  1. Architectural Elements:
    • Derived from the application domain, analysis classes, and architectural patterns/styles [Sha96].
    • Define relationships, collaborations, and behaviors for design realizations.
  1. Interface Elements:
    • User interfaces (UI).
    • External interfaces to other systems, devices, or networks.
    • Internal interfaces between design components.
  1. Component Elements:
    • Detailed specifications of software components, including algorithms and processing logic.
  1. Deployment Elements:
    • Define how software components are deployed across hardware or network environments.

Conclusion

Software design bridges user requirements and implementation, ensuring correctness, efficiency, and maintainability. By adhering to quality guidelines, leveraging fundamental concepts (e.g., abstraction, modularity, functional independence), and applying OO principles, designers create robust, scalable systems. The design process—interface, architectural, and detailed design—transforms analysis models into actionable plans, supported by a comprehensive design model.

Reference

Pressman, R. S. (2010). Software Engineering: A Practitioner’s Approach, 7th Edition. McGraw-Hill.

Lecture 11: Software Project Management and Scheduling


Introduction

Software project management involves planning, organizing, and controlling resources to deliver a software product that meets customer requirements within time and budget constraints. Effective project management focuses on scheduling, cost estimation, and risk management to ensure project success. This guide covers key concepts, techniques, and models for managing and scheduling software projects, optimized for exam preparation.

Project Management Spectrum

Effective software project management revolves around four key components, known as the Four P’s:

1. People

2. Product

3. Process

4. Project

Boehm’s W5HH Principle

Barry Boehm’s W5HH (Why, What, When, Who, Where, How, How Much) principle provides a framework for efficient project management by answering key questions:

  1. Why is the system being developed?
    • Identifies business reasons and problem statements to justify the project’s cost and time.
  1. What activities are needed?
    • Defines key tasks required by the customer to establish a project schedule.
  1. When will it be completed?
    • Specifies start and end dates for tasks to meet project goals.
  1. Who is responsible for each activity?
    • Assigns roles and responsibilities to team members.
  1. Where are they organizationally located?
    • Clarifies that responsibilities may extend beyond the software team to customers, users, and stakeholders.
  1. How will the job be done technically and managerially?
    • Defines technical and management strategies once the product scope is established.
  1. How much of each resource is needed?
    • Estimates resources required to complete the project within budget and requirements.

Software Measurements and Metrics

Software measurements and metrics quantify attributes of the software product or process to aid decision-making and project success.

Software Measurements

Software Metrics

Principles of Software Measurement

  1. Formulation: Derive appropriate measures and metrics.
  1. Collection: Gather data to compute metrics.
  1. Analysis: Apply mathematical tools to compute metrics.
  1. Interpretation: Evaluate metrics to gain insights into quality.
  1. Feedback: Provide recommendations to the software team based on metric analysis.

Size Metrics

Size metrics estimate the software’s size, critical for cost and effort estimation.

1. Lines of Code (LOC)

2. Function Points (FP)

Software Project Estimation

Software project estimation predicts the time, effort, and cost required to complete a project, critical for preventing project failure.

Responsible Persons

Factors Affecting Estimation

  1. Cost: Ensure sufficient funds to avoid project failure.
  1. Time: Estimate overall duration and task timings to manage client expectations.
  1. Size and Scope: Identify all tasks to ensure adequate materials and expertise.
  1. Risk: Predict potential events and their severity to create risk management plans.
  1. Resources: Ensure availability of tools, people, hardware, and software.

Steps of Project Estimation

  1. Estimate Project Size:
    • Use LOC or FP, based on customer requirements, SRS, and system design documents.
    • Methods: Estimation by analogy (past projects) or dividing the system into subsystems.
  1. Estimate Efforts:
    • Calculate person-hours or person-months for activities (design, coding, testing, documentation).
    • Methods:
      • Use historical organizational data for similar projects.
      • Apply algorithmic models (e.g., COCOMO) for unique projects.
  1. Estimate Project Schedule:
    • Define the Work Breakdown Structure (WBS) to assign tasks, start/end dates, and team members.
    • Convert efforts to calendar months using:Schedule (months) = 3.0 * (man-months)^(1/3)(The constant 3.0 varies by organization).
  1. Estimate Project Cost:
    • Include labor costs (effort hours * labor rate) and other expenses (hardware, software, travel, training, office space).
    • Use specific labor rates for different roles for accuracy.

Decomposition Techniques

Decomposition techniques break down the project into manageable parts for accurate estimation.

1. Software Sizing

2. Problem-Based Estimation

3. Process-Based Estimation

Software Cost Estimation

Software cost estimation predicts the approximate cost before development begins, considering multiple factors.

Factors for Project Budgeting

Tools and Techniques

  1. Expert Judgment:
    • Leverages experienced professionals’ insights for similar projects.
  1. Analogous Estimation:
    • Uses historical data from similar projects (scope, budget, size).
    • Cost-effective but less accurate, used in early phases.
  1. Parametric Estimation:
    • Uses statistical models to estimate man-hours based on past project data.
  1. Bottom-Up Estimation:
    • Divides project into work packages (WBS), estimates each, and sums for total cost.
    • Time-consuming but highly accurate.
  1. Three-Point Estimation (PERT):
    • Uses optimistic, most likely, and pessimistic estimates to handle uncertainties.
  1. Reserve Analysis:
    • Allocates reserve budget for unforeseen events, approved by sponsors.
  1. Cost of Quality:
    • Includes costs to prevent and address failures during and after the project.
  1. Vendor Bid Analysis:
    • Compares multiple vendor bids to estimate project cost.

Typical Problems

  1. Complexity: Large projects are hard to estimate accurately, especially early on.
  1. Inexperience: Estimators may lack sufficient experience.
  1. Bias: Tendency to underestimate, especially by senior professionals.
  1. Oversights: Forgetting integration and testing costs in large projects.
  1. Management Pressure: Demanding precise estimates for bids or funding.

COCOMO Model

The Constructive Cost Model (COCOMO), developed by Barry Boehm in 1981, estimates effort, cost, and schedule based on software size (KLOC).

Software Project Types

  1. Organic:
    • Small, simple projects (2–50 KLOC).
    • Small, experienced team; well-understood problem.
    • Examples: Simple inventory or data processing systems.
  1. Semidetached:
    • Medium-sized projects (50–300 KLOC) with mixed requirements.
    • Mixed team experience; some known/unknown modules.
    • Examples: Database management, complex inventory systems.
  1. Embedded:
    • Large, complex projects (>300 KLOC) with fixed requirements.
    • Large team, often less experienced; high complexity.
    • Examples: ATMs, air traffic control, banking software.

Types of COCOMO Models

  1. Basic COCOMO:
    • Static model for quick, rough estimates based on KLOC.
    • Formulas:
      • Effort (E) = a * (KLOC)^b Man-Months (MM)
      • Scheduled Time (D) = c * (E)^d Months
    • Constants:
      Project Typeabcd
      Organic2.41.052.50.38
      Semidetached3.01.122.50.35
      Embedded3.61.202.50.32
    • Example (Semidetached, 300 KLOC):
      • E = 3.0 * (300)^1.12 = 1784.42 MM
      • D = 2.5 * (1784.42)^0.35 = 34.35 Months
      • Persons = E / D = 1784.42 / 34.35 ≈ 52
  1. Intermediate COCOMO:
    • Enhances accuracy by including cost drivers (product, hardware, resource, project parameters).
    • Formulas:
      • Effort (E) = a * (KLOC)^b * EAF MM
      • Scheduled Time (D) = c * (E)^d Months
    • Effort Adjustment Factor (EAF): Product of cost driver values (ideal = 1).
    • Example (Semidetached, 300 KLOC, very high application experience = 0.82, very low programming experience = 1.14):
      • EAF = 0.82 * 1.14 = 0.9348
      • E = 3.0 * (300)^1.12 * 0.9348 = 1668.07 MM
      • D = 2.5 * (1668.07)^0.35 = 33.55 Months
  1. Detailed COCOMO:
    • Applies Basic/Intermediate COCOMO to each software engineering phase (planning, system design, detailed design, coding/testing, integration, cost model).
    • Divides software into modules, estimates effort per module, and sums for total effort.
    • Example (Distributed MIS System):
      • Database (Semidetached)
      • GUI (Organic)
      • Communication (Embedded)
      • Estimate costs separately and sum for total cost.

Advantages of COCOMO

Disadvantages of COCOMO

Conclusion

Software project management and scheduling require careful planning of people, product, process, and project activities. Boehm’s W5HH principle guides objective setting, while measurements and metrics (LOC, FP) quantify progress. Estimation techniques (decomposition, COCOMO) predict time, effort, and cost, addressing risks and resource needs. Understanding these concepts ensures effective project execution and is critical for exam success.

Lecture 12 : Software Testing


Introduction

Software testing is a critical process in software development to ensure a product meets customer requirements, is defect-free, and performs reliably. It identifies errors, gaps, or missing requirements by evaluating attributes like reliability, scalability, portability, reusability, and usability. This guide covers software testing principles, test cases, white box and black box testing, unit testing, integration testing, and comparisons, optimized for exam preparation.

Software Testing Overview

Principles of Software Testing

The following principles guide effective software testing:

  1. Testing Shows the Presence of Defects:
    • Aims to identify defects that could cause product failure.
    • Cannot guarantee 100% error-free software but reduces undiscovered defects.
    • Requires well-designed test cases to maximize defect detection.
  1. Exhaustive Testing is Impossible:
    • Testing all modules and features exhaustively is impractical.
    • Use risk analysis and prioritize critical modules to deliver on schedule.
  1. Early Testing:
    • Involve testers from the requirement gathering phase to understand the product deeply.
    • Early defect detection saves time and cost compared to late-stage fixes.
  1. Defect Clustering:
    • Most defects (80%) are found in a small portion (20%) of code (Pareto’s 80-20 Rule).
    • Focusing on high-defect areas may miss bugs in other modules.
  1. Pesticide Paradox:
    • Repeated use of the same test cases fails to uncover new defects.
    • Regularly update test cases to cover different software parts and find new bugs.
  1. Testing is Context-Dependent:
    • Testing varies by project type (e.g., e-commerce, banking, commercial websites).
    • Different products require tailored test cases based on their features and requirements.
  1. Absence of Errors Fallacy:
    • A bug-free application may still be unusable if it fails to meet user needs.
    • Testing must ensure both defect-free code and alignment with client requirements.

Test Cases

White Box Testing

Techniques

  1. Path Coverage/Testing:
    • Tests all possible paths from entry to exit based on the program’s control flow.
    • Example: Functions A → B → C → D → E → F → H → I.
  1. Loop Testing:
    • Verifies simple, nested, and concatenated loops (e.g., while, for, do-while).
    • Checks loop conditions and termination.
    • Example: while (condition) { statement(s); }.
  1. Branch Coverage/Condition Testing:
    • Tests logical conditions (true/false) for if and else branches.
    • Ensures all decision points are covered.
  1. Statement Coverage:
    • Executes every code statement at least once to verify functionality.
    • Example:
      Prints(int a, int b) {
          int result = a + b;
          if (result > 0)
              Print("Positive", result);
          else
              Print("Negative", result);
      }
      
      • Tests ensure lines 1–6 are executed.

Advantages

Disadvantages

Black Box Testing

Techniques

  1. Equivalence Partitioning:
    • Divides input values into classes with similar outcomes.
    • Tests one value per class to reduce test cases.
    • Example: Age (18–60) → Invalid: ≤17, Valid: 18–60, Invalid: ≥61.
  1. Boundary Value Analysis (BVA):
    • Tests boundary values (upper/lower limits) of input ranges.
    • Example: Age (18–60) → Test: 17 (invalid), 18, 19, 59, 60 (valid), 61 (invalid).
  1. Decision Table Testing:
    • Captures input combinations and system behavior in a table.
    • Example (Gmail Login):
      Email (C1)Password (C2)Expected Result
      TrueTrueAccount Page
      TrueFalseIncorrect password
      FalseTrueIncorrect email
      FalseFalseIncorrect email
  1. Error Guessing:
    • Uses tester experience to identify problematic areas.
    • Examples: Divide by zero, null values, empty submit, invalid file uploads.
  1. State Transition Testing:
    • Tests behavior for different inputs to the same function.
    • Example: Limited login attempts (e.g., lock account after 3 failed tries).
  1. All Pairs Testing:
    • Tests discrete combinations of inputs (e.g., checkboxes, radio buttons).
    • Reduces test cases for combinatorial inputs.

Advantages

Disadvantages

Black Box vs. White Box Testing

AspectBlack Box TestingWhite Box Testing
KnowledgeNo internal structure knowledge; focuses on input/output.Knows internal structure and code.
Also Known AsFunctional, data-driven, closed-box, behavioral.Structural, glass box, code-based, transparent.
Programming KnowledgeMinimal required.Complete knowledge required.
Testing LevelsSystem, acceptance testing.Unit, integration testing.
Performed BySoftware testers.Software developers.
TimeLess time-consuming.More time-consuming.
BasisExternal expectations.Internal code workings.
Testing ApproachTrial and error; tests data domains.Tests internal boundaries and code paths.
ExampleSearch on Google.Verify loops with input keywords.

Unit Testing

Purpose

Unit Testing in Object-Oriented Context

Advantages

Disadvantages

Integration Testing

Purpose

Example

Types

  1. Incremental Integration Testing:
    • Modules are integrated and tested one by one in ascending order.
    • Tests data flow and function correctness.
    • Subtypes:
      • Top-Down:
        • Starts with top-level modules, moving downward.
        • Uses stubs (dummy programs) for missing lower modules.
        • Prioritizes critical modules for early flaw detection.
      • Bottom-Up:
        • Starts with lowest modules, moving upward.
        • Uses drivers (dummy programs) for missing higher modules.
        • Allows simultaneous testing of subsystems.
    • Example (Flipkart Application):
      • Flow: Login → Home → Search → Add to Cart → Payment → Logout.
  1. Non-Incremental Integration Testing (Big Bang Testing):
    • Integrates and tests all modules at once after individual testing.
    • Suitable for smaller systems.
    • Difficult to pinpoint errors due to lack of parent-child hierarchy.

Incremental vs. Non-Incremental Testing

AspectIncremental TestingNon-Incremental Testing
Integration ApproachTests modules gradually.Tests all modules at once.
PlanningRequires step-by-step planning.Simpler, one-time planning.
Resource EfficiencyUses more resources (separate tests).Uses fewer resources (single test).
Issue DetectionEarly detection with progressive testing.Late detection due to bulk testing.
ComplexityManages smaller pieces, less complex.More complex due to testing everything.

Conclusion

Software testing ensures a product is reliable, functional, and meets user needs. Key principles guide defect detection, while test cases verify functionality. White box testing examines code structure, black box testing focuses on functionality, unit testing isolates components, and integration testing verifies module interactions. Understanding these concepts, techniques, and examples is critical for exam success and effective software development.

Testing and Quality Assurance Exam Notes

1. System Testing

2. Importance of System Testing

3. Types of Software Testing

4. System Testing Example

5. Acceptance Testing

6. Importance of Acceptance Testing

7.(types of acceptance testing)

8. Alpha vs. Beta Testing

9. Verification vs. Validation

10. Defect/Bug

11. Defect Life Cycle

12. Testing vs. Debugging

13. Software Quality

14. Software Quality Dimensions

15. Factors Affecting Software Quality

16. Software Quality Metrics

17. Software Quality Management (SQM)

18. How to Achieve Software Quality

19. Quality Assurance vs. Quality Control