software engineering notes by gord
software engineering notes by gord
Example: Consider building a Gym Fitness Tracking App. The layered approach ensures the
app is developed using appropriate tools (e.g., Android Studio for mobile app development),
methods (e.g., agile), processes (defining sprints), and a focus on delivering a bug-free app that
meets user requirements.
● Software Process: A set of related activities that lead to the production of a software
product. Commonly includes:
○ Specification: What the system should do (requirements).
○ Design and Implementation: How the system will be built.
○ Validation: Ensuring the system works as intended.
○ Evolution: Adapting the system over time.
● Process Framework:
○ Process Framework refers to the general organization of activities required for
software development (e.g., initiation, planning, execution, closure).
● Umbrella Activities:
○ Activities that support the entire software process, such as:
1. Project Tracking and Control: Monitoring progress.
2. Risk Management: Identifying and mitigating risks.
3. Quality Assurance: Ensuring software quality through reviews, audits.
4. Configuration Management: Keeping track of different versions of
software.
Example: For the Gym Fitness Tracking App, the process framework would include defining
the app’s core features (calorie tracking, workout logging), developing the design, testing, and
tracking the app's evolution over time. Umbrella activities like configuration management would
ensure that updates are correctly applied.
3. Process Models
a. Waterfall Model:
● Linear Sequential Flow: One phase must be completed before the next begins.
● Phases:
1. Requirements.
2. Design.
3. Implementation.
4. Verification.
5. Maintenance.
● Drawback: Limited flexibility; no feedback allowed once a stage is completed.
Example: Developing the Gym Fitness Tracking App using the waterfall model means clearly
defining features, designing UI, implementing code, testing, and then deploying without
returning to previous stages.
b. Incremental Model:
● Iterative: Breaks the project into smaller parts; each part is developed separately and
incrementally adds to the system.
● Advantage: Allows feedback and evolution over iterations.
Example: In the Gym Fitness Tracking App, you first develop basic features like tracking
workouts, then incrementally add features like calorie tracking, graphs, etc.
Example: A prototype of the Gym Fitness Tracking App might initially support basic workout
logging. Feedback would help iterate on UI improvements and performance monitoring. The
spiral model would include risk analysis, such as potential user privacy concerns for workout
data, with solutions integrated in each cycle.
4. Introduction to Agile, Agile Model – Scrum
● Agile Methodology:
○ Focuses on flexibility, customer collaboration, and adaptive planning.
○ Principles:
1. Customer satisfaction through early and continuous delivery.
2. Embrace changing requirements.
3. Frequent delivery of working software.
4. Simplicity in design and implementation.
● Scrum: A popular agile framework.
○ Roles:
1. Product Owner: Defines features of the product.
2. Scrum Master: Facilitates the Scrum process.
3. Development Team: Develops the software.
○ Artifacts:
1. Product Backlog: List of features or tasks.
2. Sprint Backlog: Subset of tasks to be done in the next sprint.
3. Increment: Working software delivered at the end of each sprint.
○ Sprints: Short development cycles (2–4 weeks) that produce a working product
increment.
○ Meetings:
1. Sprint Planning: Decide what to achieve in a sprint.
2. Daily Stand-up: 15-minute meeting to review progress.
3. Sprint Review: Demonstrating the completed work.
4. Sprint Retrospective: Reflect on improvements.
Example: The Gym Fitness Tracking App can be developed using Scrum. The product
backlog could include tasks like creating an admin login, workout templates, and calorie
trackers. Sprints might focus on completing one feature at a time (e.g., the workout logger),
followed by user feedback and refinement.
Advantages/Benefits:
Detailed Explanation:
1. Quality Focus: Ensures compliance with requirements through reviews and testing.
2. Process: Provides consistency across teams and projects, making the development
predictable.
Use Cases/Applications:
Detailed Explanation:
1. Framework Activities:
○ Requirement gathering.
○ Design.
○ Implementation.
○ Testing.
○ Maintenance.
2. Umbrella Activities:
○ Risk Management: Identifying, assessing, and mitigating risks.
○ Configuration Management: Tracking and managing changes in software.
Use Cases/Applications:
Process Models
1. Waterfall Model:
○ Prototyping:
■ Early development of a working model for feedback.
■ Advantages: Captures unclear requirements.
■ Disadvantages: Can lead to scope creep.
○ Spiral Model:
■ Combines iterative development with risk analysis.
■ Four phases: Planning, Risk Analysis, Engineering, and Evaluation.
■ Advantages: Effective for large and high-risk projects.
■ Disadvantages: Expensive and complex.
1. Agile:
● Definition: A Use Case defines a specific interaction between a user (actor) and the
system to achieve a goal. It describes the system’s behavior in response to a request
from the user.
● Components of a Use Case:
1. Actor: The user or system that interacts with the system.
2. Precondition: Conditions that must be true before the use case can start.
3. Main Flow: Step-by-step description of how the interaction unfolds.
4. Alternate Flow: What happens if the interaction doesn't follow the main flow.
5. Postcondition: The state of the system after the use case is completed.
Example: In the Gym Fitness Tracking App, one use case could be "Log Workout Session":
● Actor: User
● Precondition: User is logged in.
● Main Flow:
1. User selects a workout from the list.
2. User enters the number of sets and reps.
3. System stores the workout data.
● Postcondition: Workout is logged, and the system updates user progress.
Example: For the Gym Fitness Tracking App, the SRS would describe:
● Functional Requirements: The app should allow users to log workouts, track calories,
and view progress reports.
● Non-Functional Requirements: The app must respond to user inputs within 2 seconds
and ensure data privacy.
● External Interfaces: Integration with a calorie-tracking API or fitness wearables.
3. Flow-Oriented Model
● Definition: The flow-oriented model represents the flow of data through a system using
diagrams. It focuses on how inputs are transformed into outputs through a series of
processes.
● Types of Flow Models:
1. Data Flow Diagrams (DFD): Show how data moves between processes, data
stores, and external entities.
2. Control Flow Diagrams: Show how control signals and events flow through the
system.
Example: In the Gym Fitness Tracking App, a simple Data Flow Diagram (DFD) might
include:
● Definition: A Data Flow Model depicts the flow of information through a system,
focusing on data processing steps rather than control flow.
● Elements:
1. Processes: Represented by circles, these are the functions where data is
processed.
2. Data Stores: Represented by open-ended rectangles, these are repositories
where data is stored.
3. Data Flows: Represented by arrows, these show the movement of data between
processes and stores.
4. External Entities: Represented by rectangles, these are entities outside the
system that interact with it.
Example: For the Gym Fitness Tracking App, a Data Flow Model could include:
Advantages/Benefits:
● Avoids misunderstandings between stakeholders.
● Provides a clear reference for design and development.
● Reduces the risk of project failure by addressing requirements early.
● Use Case: A description of system interactions with users or other systems to achieve
specific goals.
● Actors: Entities interacting with the system (e.g., user, external system).
● Components:
○ Primary Actor: Initiates the interaction.
○ Scenario: Sequence of steps for achieving the goal.
○ Preconditions/Postconditions: System state before and after the interaction.
Advantages/Benefits:
Detailed Explanation:
Use Cases/Applications:
Structure of an SRS:
1. Introduction:
○ Purpose, scope, definitions.
2. Overall Description:
○ System environment, assumptions, and dependencies.
3. Specific Requirements:
○ Functional and non-functional details.
4. Appendices:
○ Glossary, references.
Advantages/Benefits:
Use Cases/Applications:
Flow-Oriented Model
● Represents how data flows through the system, showing the processes and
transformations applied to it.
● Components:
○ Processes: Functions that transform data.
○ Data Stores: Storage of data within the system.
○ Data Flows: Movement of data between entities.
Advantages/Benefits:
Detailed Explanation:
1. Data Flow Diagram (DFD):
○ Levels:
■ Context Diagram: High-level view showing system boundaries.
■ Level-1 DFD: Detailed decomposition of processes.
○ Symbols:
■ Oval: Process.
■ Arrow: Data flow.
■ Rectangle: External entity.
■ Open Rectangle: Data store.
Example:
Use Cases/Applications:
● Designing systems with significant data flow, such as banking systems or inventory
management.
Advantages/Benefits:
Example:
Let me know if you need notes for additional units or any topic explained further!
● Definition: After gathering and analyzing requirements, the next step is to convert those
requirements into a detailed design that can be implemented in code. This process
ensures that functional and non-functional requirements are translated into architectural
components.
● Steps in Translation:
1. Identify Major System Components: Identify key modules or components.
2. Define Interfaces: Determine how the components will interact.
3. Design Data Structures: Define the organization of the data used by the
system.
4. Create Functional Flow: Map out how data flows between components.
Example: For the Gym Fitness Tracking App, requirements such as workout logging and
calorie tracking are transformed into design components like the workout module, calorie
tracking module, and user authentication module. The interaction between these modules is
defined using interfaces.
● Design Process: The design process is a series of steps that engineers follow to arrive
at the final design of a system. It involves:
1. Architectural Design: Defining the overall structure of the system.
2. Detailed Design: Specifying the system components and their interactions.
3. Design Review: Ensuring the design meets the requirements.
b. Modularity: - Definition: Dividing the system into smaller, manageable parts (modules) that
can be developed and tested independently. - Goal: High cohesion within modules and low
coupling between modules. - Example: The app’s features could be divided into separate
modules: a workout module, a diet module, and a progress tracker, each developed
independently but interacting with the others.
3. Structure Charts
Example: For the Gym Fitness Tracking App, a structure chart might have modules for:
● User Authentication
● Workout Logging
● Calorie Tracking
● Progress Reporting
The chart will show how data flows between these modules, ensuring logical organization and
separation of concerns.
Unit 3: Design Modeling
Steps in Translation:
Advantages/Benefits:
Example:
● In an e-commerce system:
○ Requirement: Users should search for products.
○ Design: A search engine module with components for query input, result retrieval,
and display.
● Design Process: A structured approach to create a design model for the system.
● Stages:
1. Data Design: Representation of data structures and databases.
2. Architectural Design: High-level structure of the system.
3. Interface Design: Interaction between system components and users.
4. Component Design: Detailed specification of each module.
Advantages/Benefits:
Detailed Explanation:
1. Data Design:
○ Focus on defining how data will be organized, stored, and accessed.
○ Example: Database schema for user accounts.
2. Architectural Design:
○ Establishes overall system structure (e.g., layered architecture).
○ Example: MVC (Model-View-Controller) pattern.
3. Interface Design:
○ Specifies user interfaces and APIs.
○ Example: Login form for users.
4. Component Design:
○ Details each module’s internal logic and interactions.
○ Example: A payment gateway module.
Use Cases/Applications:
Design Concepts
1. Abstraction:
Structure Charts
Components:
Advantages/Benefits:
Example:
Use Cases/Applications:
● Used in structured programming and software engineering for visualizing system design.
Sample Viva Questions:
1. What is the purpose of translating the requirements model into the design model?
2. List the stages in the design process and explain their significance.
3. Define abstraction. How is it applied in software design?
4. What are the characteristics of modularity in software design?
5. Explain functional independence with an example.
6. What is a structure chart? How does it help in software design?
7. Differentiate between data flow and control flow in structure charts.
1. Function-Based Metrics
Example: For the Gym Fitness Tracking App, function points would be calculated based on:
2. Software Measurement
Common Metrics:
● Defect Density: Number of defects per size of the software (e.g., per KLOC).
● Cyclomatic Complexity: Measures the complexity of the code based on the number of
independent paths.
Example: For the Gym Fitness Tracking App, you could track:
● Defect Density: After each development sprint, calculate how many bugs are found per
1,000 lines of code.
● Cyclomatic Complexity: Measure the complexity of functions like the workout logger to
ensure the code remains maintainable.
● Definition: Software project estimation involves predicting the effort, time, and cost
required to develop a software system.
● FP-Based Estimation Process:
1. Calculate Unadjusted Function Points (UFP): Based on inputs, outputs, user
interactions, files, and external interfaces.
2. Determine Value Adjustment Factor (VAF): Adjusts the UFP by considering
factors like performance, usability, security.
3. Calculate Adjusted Function Points (AFP): Adjust UFP using VAF to get the
final estimate.
Example: For the Gym Fitness Tracking App, the team estimates:
● UFP: 20 (based on inputs like workouts, outputs like progress reports, etc.).
● VAF: 1.1 (accounting for performance requirements, data privacy, etc.).
● AFP: 22 FP. Using the FP estimate, the team calculates the effort in person-months and
cost based on their productivity rate.
4. Project Scheduling
● Definition: Project scheduling involves planning the sequence and timing of tasks
needed to complete a software project. It ensures that the project stays on track in terms
of time and resources.
● Components of Project Scheduling:
1. Timeline Charts (Gantt Charts): A graphical representation of tasks scheduled
over time. It helps visualize the start and end dates of tasks and track progress.
2. Tracking the Schedule: Monitoring the project’s progress against the schedule
and identifying variances to take corrective actions.
Example: For the Gym Fitness Tracking App, the project manager would create a Gantt
Chart to visualize the following tasks:
Function-based Metrics
● Function-based Metrics: Measure software size and complexity based on its functional
components.
● They are typically derived using Function Points (FP), which quantify the functionality
delivered to the user.
Key Components:
Formula:
Advantages/Benefits:
● A banking application:
○ Inputs: 5, Outputs: 3, Inquiries: 2, ILFs: 4, EIFs: 1.
○ Assign appropriate weights and calculate FP.
Software Measurement
Advantages/Benefits:
Key Metrics:
Example:
● A project with 20,000 LOC and 100 defects gives a defect density of 5 defects per 1,000
LOC.
Advantages/Benefits:
● Project Estimation: Predicting the resources, time, and cost needed for software
development.
● Function Point (FP) Based Estimation:
○ Steps:
1. Calculate Function Points.
2. Estimate productivity (FP/person-month).
3. Estimate effort, time, and cost.
Advantages/Benefits:
Example:
Project Scheduling
● Project Scheduling: Planning and managing the timeline of tasks to complete the
project on time.
● Tools:
○ Timeline Charts: Visualize task durations and dependencies (e.g., Gantt
Charts).
○ Tracking Tools: Monitor progress against planned milestones.
Key Techniques:
Advantages/Benefits:
Example:
● Definition: QC involves the operational techniques and activities used to fulfill quality
requirements. It focuses on identifying defects in the final product.
● Key Activities:
○ Testing (unit, integration, system testing).
○ Inspections and reviews (code reviews, design reviews).
○ Defect tracking and reporting.
● Purpose: To ensure the product meets the desired quality standards before release.
Example: In the Gym Fitness Tracking App, QC ensures that the calorie tracker accurately
calculates values by conducting rigorous system testing.
Example: For the Gym Fitness Tracking App, QA ensures that the development team follows
coding standards and conducts peer reviews to prevent defects during development.
1. Process Assessment
Example: If the development team for the Gym Fitness Tracking App finds that testing is
delayed, they may assess and improve their process to integrate automated testing early in the
development cycle.
2. Process Improvement
Example: After an assessment, the team decides to adopt a CI/CD pipeline for faster
deployments.
Software Risks
1. Definition: Risks are potential problems that may affect the success of a project.
2. Types of Risks:
1. Risk Identification
3. Risk Mitigation
● Definition: Developing strategies to reduce the likelihood or impact of risks.
● Mitigation Strategies:
1. Avoidance: Eliminate the risk (e.g., choosing a simpler API).
2. Reduction: Minimize the impact (e.g., allocate additional resources).
3. Acceptance: Acknowledge and plan for the risk.
● Example: To mitigate the risk of incomplete requirements, the team conducts detailed
requirement analysis with stakeholders.
● Definition: Continuously tracking identified risks and identifying new ones during the
project lifecycle.
● Activities:
1. Regular status meetings to review risks.
2. Updating the risk management plan as necessary.
● Example: The team monitors the progress of the API integration and has a contingency
plan ready for delays.
Differences:
Advantages/Benefits:
Example:
● Process Assessment:
○ Evaluating the effectiveness of current software development processes.
○ Models like CMMI (Capability Maturity Model Integration) provide a structured
approach.
● Process Improvement:
○ Making changes to address weaknesses identified during assessments.
○ Common frameworks: Six Sigma, Total Quality Management (TQM).
Advantages/Benefits:
Example:
● Software Risk: Potential events that can negatively affect the project timeline, cost, or
quality.
● Types:
1. Project Risks: Budget overruns, resource unavailability.
2. Technical Risks: Unproven technology, performance issues.
3. Business Risks: Market changes, client withdrawal.
Advantages/Benefits:
1. Risk Identification:
Cyclomatic Complexity
● Cyclomatic Complexity:
○ A software metric used to measure the complexity of a program’s control flow.
○ Indicates the number of independent paths through a program.
Formula:
● CC=E−N+2PCC = E - N + 2P
○ EE: Number of edges in the control flow graph.
○ NN: Number of nodes in the control flow graph.
○ PP: Number of connected components.
Interpretation:
● Complexity values:
○ 1−101-10: Simple, low-risk programs.
○ 11−2011-20: Moderate complexity.
○ >20>20: High complexity, error-prone.
Advantages/Benefits:
Example:
● A function with:
○ 6 edges, 5 nodes, and 1 connected component:
■ CC=6−5+2=3CC = 6 - 5 + 2 = 3.
2. Integration Testing
3. Validation Testing
● Definition: The process of ensuring that the software meets user expectations and
requirements.
● Objective: To check if the software meets business needs and requirements.
● Method:
○ Verify that the software behaves as intended in real-world scenarios.
● Example: Confirming that the Gym Fitness Tracking App correctly logs workouts and
calculates calories for different user profiles.
4. System Testing
1. Black-Box Testing
● Definition: Testing without knowledge of the internal workings of the application.
● Focus: Input-output behavior, not the code itself.
● Advantages:
○ Tests are based on specifications.
○ No need for code knowledge.
● Example: Testing the calorie calculation feature in the Gym Fitness Tracking App by
feeding inputs (e.g., user weight, duration of workout) and checking outputs.
2. White-Box Testing
● Definition: A white-box testing technique that uses control flow graphs to identify
independent paths in the code.
● Objective: To ensure that all paths in the program are tested.
● Steps:
1. Create a control flow graph of the code.
2. Identify independent paths.
3. Design test cases that execute these paths.
● Benefit: Helps achieve maximum code coverage with minimal test cases.
Example: In the Gym Fitness Tracking App, basis path testing would include testing all
different routes through the code for calculating calories burned, considering different user
inputs.
2. Cyclomatic Complexity
● Definition: A software metric used to measure the complexity of a program based on its
control flow graph.
● Formula: V(G)=E−N+2PV(G) = E - N + 2P
○ V(G)V(G): Cyclomatic complexity.
○ EE: Number of edges in the control flow graph.
○ NN: Number of nodes in the control flow graph.
○ PP: Number of connected components (typically 1 for a single program).
● Interpretation:
○ A higher cyclomatic complexity indicates more complex code, potentially harder
to test and maintain.
● Example: A function in the Gym Fitness Tracking App that handles user input with
many conditional branches (e.g., different types of workouts) will have higher cyclomatic
complexity and require more test cases.
Key Aspects:
● Test Plan: A document that outlines the scope, objectives, resources, schedule, and
activities of the testing process.
● Test Strategy: High-level description of the testing approach and the methods to be
used.
● Test Case Design: Creation of test cases based on requirements, specifications, and
design documents.
Advantages/Benefits:
1. Unit Testing:
○ Definition: Checks if the software meets the business requirements and is fit for
its intended purpose.
○ Key Activities: Reviews, walkthroughs, and user acceptance testing.
○ Example: Verifying if the features of an e-commerce application match user
specifications (e.g., payment process works as described).
○ Advantages: Ensures the software fulfills the requirements from a user's
perspective.
4. System Testing:
○ Definition: Testing the complete and integrated software to verify that it meets
the specified requirements.
○ Approach: End-to-end testing covering all functional and non-functional aspects.
○ Example: Testing the entire e-commerce platform with real user transactions.
○ Advantages: Ensures the system behaves as expected in a real-world
environment.
1. Black-Box Testing:
○ Definition: A testing technique where the tester does not have knowledge of the
internal code or logic of the application.
○ Focus: Functional behavior, input-output validation.
○ Techniques:
■ Equivalence Partitioning: Divides input data into valid and invalid
partitions.
■ Boundary Value Analysis: Tests the boundaries of input ranges.
○Example: Testing an input form by entering valid and invalid data to check the
response.
○ Advantages: Allows testing from a user perspective; effective for validating
functionality.
2. White-Box Testing:
○ Definition: A testing method where the tester has complete knowledge of the
internal logic, code, and structure of the application.
○ Focus: Code structure, logic flow, path coverage.
○ Techniques:
■ Statement Coverage: Ensures every statement is executed at least
once.
■ Path Coverage: Ensures every possible path in the code is tested.
○ Example: Testing a function by covering all possible conditional branches (e.g.,
if-else statements).
○ Advantages: Identifies hidden errors and ensures code quality.
● Basis Path Testing: A white-box testing technique aimed at ensuring all independent
paths in a program are tested.
● Cyclomatic Complexity: Used to determine the number of paths in the control flow
graph.
● Process:
1. Create a control flow graph for the program.
2. Identify independent paths.
3. Create test cases that cover each independent path.
Advantages/Benefits:
Example:
Let me know if you need further elaboration on any section or more sample questions!