Software Engineering

Created by
BBorhan
Last edited time
Tag
Year 3 Term 2

Resources


https://nptel.ac.in/courses/106105087

https://www.youtube.com/watch?v=IHx9ImEMuzQ&list=PLQ-nEJNYlEV29CBLzIDxcogm6CEZjVad2&index=1

https://www.youtube.com/watch?v=ErCgOsea_5I

Introduction to Software Engineering


What is Software Engineering ?

Software Crisis

  • Fail to meet user requirements
  • Expensive
  • Difficult to alter, debug and enhance
  • Often delivered late
  • Use resources non-optimally

Which factors are contributing to the software crisis ?

Programming an art or engineering ?

Initially every technology starts in an art form, slowly becomes a craft and then graduates into an engineering approach.

Exploratory Software Development

What is wrong is Exploratory style?

How it exponentially increases ? → Human Cognitive System (Short term and long term memory) → Huge numbers of variables in large projects → Quickly exceeds the grasping power of an individual → Require an unduly large effort to master the problem

How software engineering solves this ?

Software Engineering principle extensively use techniques specifically targeted to overcome the human cognitive limitations.

Two important principle profusely Used: (Two fundamentals techniques to handle the complexity)

  1. Abstraction
    • Simplify a problem by omitting unnecessary details
    • Focus attention on only one aspect of the problem and ignore other aspects and irrelevant details
    • Also called Model Building
    • Does every problem have a single abstraction ?
      • Several abstractions of the same problem can be created.
        • focus on some specific aspect and ignore others
        • different types of models help understand different aspect of the problem
      • For complex problems
        • A single level of abstraction is inadequate
        • A hierarchy of abstraction may have to be constructed
      • Hierarchy of models
        • A model in one layer is abstraction of the lower layer model
        • An implementation of the model at the higher layer.
  1. Decomposition
    1. Decompose a problem into many small independent parts
      1. The idea that each small part would be easy to grasp and therefore can be easily solved
      1. The full problem is solved when all the parts are solved.
    1. Any arbitrary decomposition of a problem may not help
      1. The decomposed parts must be more or less independent of each other

Why study Software Engineering ?

Two types of software projects:

  1. Products (Generic software)
    • Packaged Software : Prewritten software available for purchase
      • Horizontal market software : Meets needs of many companies
      • Vertical market software : designed for particular industry
  1. Services (Custom software)
    • Software developed at some user’s requests
    • Usually developer tailors some generic solution
    • Software service is an umbrella term, includes
      • Software customization
      • Software maintenance
      • Software testing
      • Also contract programmers carrying out coding or any other assigned activities

Emergence of Software Engineering Techniques

Life Cycle


A software life cycle model/Process model/Software Development Life cycle

Why Model Life Cycle ?

A life cycle model

  • defines entry and exit criteria for every phase
  • A phase is considered to be complete
    • only when all its exit criteria are satisfied

Software Life Cycle/Software Process

Series of identifiable stages that a software product undergoes during its life time:

  • Feasibility study
  • Requirements analysis and specification
  • Design
  • Coding
  • Testing
  • Maintenance

Classical Waterfall Model

Why it is called Waterfall model ?

[…]

Phase Containment of Errors

Advantages

Disadvantages

When to use the waterfall model ?

V Model

Left = Development phase, Right=Testing phase

Strengths

Weaknesses

When to use V model

Prototyping Model

Reasons for prototyping

Advantages

Disadvantages

Major difficulties of Waterfall based Models

Incremental Model

Characteristics


Benefits

Developer Perspective

  1. Requirements outline
  1. Split into Features
  1. Design
  1. Develop Increment
  1. Validate Increment
  1. Integrate Increment
  1. Validate System

Which step first?

Evolutionary Model

Activities in iteration

Evolutionary model with iteration

Advantages

Disadvantages

RAD Model

Important underlying principle

  • A way to reduce development time and cost and yet have flexibility to incorporate changes:

    “Make only short term plans and make heavy reuse of existing code”

Methodology

How does RAD facilitate faster developement ?

Suitable for

Not suitable for

Unified Process

Inception Activities

Outcome of Inception Phase:

Spiral/Mata Model

📌 Requirements Engineering Overview

Definition:

Requirements are formal statements about what a software system should do, how it should behave, what properties and constraints it must satisfy, and the qualities it must possess.


🔍 Requirements Analysis

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

Key Goals:


📘 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

"Big Smart Students Find New Topics"

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:


✅ 20. Reviewing the CRC Model

During review:

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