Term 3 Revision - CSU1296 - Shoolini U

Term 3 Revision

Software Crisis (Meaning)

When software demand, complexity, and challenges increase but we still use the same workforce, tools, and methods — it leads to serious problems like delays, poor quality, and unmanageable code. This is called a Software Crisis.

When It Happens

Main Reasons

Solution

The best approach is Software Engineering because it is:

Guidelines to solve the crisis:

Generic Software Process Activities

  1. Communication

    • Talk to customers, developers, and stakeholders
    • Gather requirements
  2. Planning

    • Define tasks, schedule, resources, risks
    • Estimate and track project progress
  3. Modeling

    • Create representations (like algorithms, flowcharts)
    • Analyze requirements and design the system
  4. Construction

    • Code the software
    • Test the code to ensure correct output and logic
  5. Deployment

    • Deliver the product to the customer
    • Take feedback and make corrections if needed

Software Life Cycle Models

They define phases and sequence to develop software. Popular SDLC models:

Waterfall Model (Classic)

Phases and Deliverables:

  1. Requirement Analysis

    • Understand & validate requirements
    • Deliverable: RUD (Requirements Understanding Document)
  2. System Design

    • Design system as per requirements
    • Deliverables: HLD (High Level), LLD (Low Level)
  3. Implementation

    • Write and unit test code
    • Deliverable: Code + results
  4. System Testing

    • Integrate and test system (functional + non-functional)
    • Deliverables: Test cases, reports, defect list
  5. Deployment

    • Deploy to real environment, ensure setup works
    • Deliverables: User Manual, Environment Docs
  6. Maintenance

    • Fix bugs, add new features
    • Deliverables: Production issues log, updated user manual

Advantages:

Disadvantages:

Iterative Waterfall Model

Advantages:

Limitations:

Spiral Model (Meta Model)

Phases in Each Loop

  1. Planning
  2. Risk Analysis
  3. Development & Testing
  4. Evaluation (customer feedback)

When to Use Spiral Model

Advantages

Disadvantages

Win-Win Spiral Model

3 Anchor Points

  1. LCO – Life Cycle Objectives
  2. LCA – Life Cycle Architecture
  3. IOC – Initial Operational Capability

7 Steps in Win-Win Spiral Model

  1. Identify stakeholders
  2. Identify their win conditions
  3. Reconcile win conditions → set goals & constraints
  4. Evaluate alternatives, manage risks
  5. Define next level product/process, possibly split into subsystems
  6. Validate product/process
  7. Go to next loop with agreed goals

Agile Software Development

Agile Manifesto: 4 Core Values

  1. Individuals and Interactions over processes/tools
  2. Working Software over documentation
  3. Customer Collaboration over contract negotiation
  4. Responding to Change over following a plan

Agile Principles (Key Points)

Advantages

Disadvantages

Purpose of PSP & TSP

Both help improve:

TSP (Team Software Process)

Key Concepts

TSP Phases

  1. Launch – Define goals, assign roles, plan
  2. Implementation – Coding, testing, reviews
  3. Postmortem – Analyze results and improve for next time

TSP Benefits

PSP (Personal Software Process)

Key Concepts

PSP Phases

  1. Planning – Task/time estimates
  2. Design – Detailed design to avoid defects
  3. Development – Code with time tracking
  4. Testing – Unit testing and code reviews
  5. Postmortem – Analyze and improve

Relationship Between PSP & TSP

Personal Software Process (PSP) – Example (John)

Scenario: John develops a product review feature for an e-commerce site.

  1. Planning

    • Estimated: 10 hours
    • Tasks: DB design, UI, backend logic, unit testing
  2. Time Tracking

    • Actual time: 12 hours
    • Breakdown: DB – 2h, UI – 3h, Backend – 4h, Testing – 2h
  3. Defect Tracking

    • Backend caused 5 bugs
    • Fix time: +1 hour
  4. Postmortem

    • Underestimated UI time
    • Backend needs better design to reduce bugs
  5. Improvements

    • Next time: more design focus, better time estimates

Team Software Process (TSP) – Example (Team Project)

Scenario: John works in a team on a recommendation engine.

  1. Team Roles

    • Team Leader, Developer (John), Quality Manager, Planning Manager
  2. Planning

    • Tasks assigned:

      • Data: 20h (Data Engineer)
      • Backend: 15h (John)
      • UI: 10h (Frontend Dev)
  3. Team Coordination

    • Everyone logs hours in shared system
    • Regular review meetings
  4. Quality Control

    • Code reviewed by Quality Manager
    • Testing team runs integration/system tests
  5. Metrics Tracking

    • Track:

      • Defect density
      • Team velocity
  6. Postmortem

    • John’s backend = low defects (good reviews/testing)
    • Delay: 5h due to UI issues
    • Improvement: Better backend–frontend coordination next time

Goal:

Choose the best SDLC model based on project needs (size, complexity, budget, time, etc.)

Key Parameters for Model Selection

  1. Requirements Characteristics

    • Are requirements clear and stable?
    • Will they change frequently?
    • Are they complex or numerous?
    • Can they be defined early?
  2. Development Team

    • Team size
    • Developers’ experience in similar projects and technologies
    • Level of domain knowledge
    • Understanding of user requirements
    • Training availability
  3. User Involvement

    • User’s expertise and experience
    • Will users be involved in all phases?
  4. Project Type & Risk

    • Project size & duration
    • Budget stability
    • Resource availability
    • Schedule pressure
    • Complexity and risk level

Based on these factors, models like Agile (for changing requirements), Waterfall (for clear requirements), or Spiral (for high risk) can be selected.

Software Requirement

Requirement Engineering

Requirement Engineering Process

  1. Feasibility Study

    • Checks if project is practical and beneficial

    • Types:

      • Technical: Can tech meet needs?
      • Operational: Will it solve the problem?
      • Economic: Is it profitable?
  2. Requirement Elicitation & Analysis

    • Gather needs from customers, users, stakeholders

    • Common issues:

      • Wrong people involved
      • Users unclear or change minds
      • Conflicting needs
  3. Software Requirement Specification (SRS)

    • Analyst converts user requirements into technical document

    • Tools used:

      • DFD (Data Flow Diagram): shows data movement
      • Data Dictionary: defines terms clearly
      • E-R Diagram: shows entities, relationships, attributes
  4. Requirement Validation

    • Check if requirements are:

      • Feasible, Correct, Complete, Clear
    • Techniques:

      • Reviews/Inspections
      • Prototyping
      • Test-case generation
      • Automated consistency checks

Fundamental Issues in Software Design

  1. Meeting User Requirements

    • Understand what the user really needs
    • If needs are missed, software becomes useless
  2. Maintaining Simplicity

    • Avoid unnecessary complexity
    • Simple UI = better usability and fewer errors
  3. Scalability

    • Software should handle growth in users/data
    • Poor scalability = crashes or slowdowns
  4. Performance

    • Must run fast and use resources efficiently
    • Slow software = frustrated users
  5. Security

    • Protect against unauthorized access
    • Critical for sensitive domains like banking
  6. Flexibility & Maintainability

    • Easy to update, add features, or fix bugs
    • Important for long-term software evolution
  7. Handling Errors & Failures

    • Should show helpful error messages, not crash
    • Makes software reliable and user-friendly
  8. Usability

    • Easy to learn and use
    • Better usability = fewer mistakes and higher productivity
  9. Interoperability

    • Should work with other systems/software
    • Essential for data sharing and integration
  10. Cost & Time Management

Cohesion

High Cohesion

Low Cohesion

Coupling

Low Coupling

High Coupling

Cohesion vs Coupling

Concept Good Practice Poor Practice
Cohesion High (Focused tasks) Low (Unrelated tasks)
Coupling Low (Independent modules) High (Tightly linked)

Combined Best Practice

Real Example: Amazon

Function-Oriented Design (FOD)

General Procedure

  1. Start with what the system does
  2. Break it into high-level → low-level functions

Key Concepts

Example: Online Library System

Advantages

Disadvantages

FOD Strategies

1. Data Flow Diagrams (DFD)

DFD Components:
Symbol Meaning
Entity (source/destination)
Process (action/function)
=▭= Data Store (storage)
Data Flow (movement)
DFD Levels:
DFD Rules:
  1. Every process = 1 input, 1 output
  2. Every data store = at least 1 input and 1 output
  3. All flows must go to a process or store

2. Data Dictionary

Example:

Attribute Datatype Size Description
Student_ID Int 03 Unique student ID
Name String 20 Student name

Types:

Structured Analysis

Purpose

Tools Used in Analysis Phase

Tool Purpose
DFD (Data Flow Diagram) Shows flow of data, processes, stores, entities
ERD (Entity Relationship Diagram) Shows entities, attributes, and relationships
Data Dictionary Defines all data elements and attributes
Process Specification (PSPEC) Describes logic using structured English or flowcharts
Decision Tree / State Transition Diagram Used for complex logic or state-based modeling

Structured Design

Tools Used in Design Phase

Tool Purpose
Structure Chart Shows module hierarchy and data flow
Pseudo Code Describes internal logic of modules
Modular Design Breaks system into cohesive, loosely coupled modules
Database Design Defines tables, keys, relationships, normalization
Interface Design Describes how users interact with the system (UI/UX)
Control Flow Design Specifies decision-making and process flow

Advantages of SAD

Disadvantages of SAD

What is UML?

Why UML is Needed

Major UML Diagram Types (With Examples)

UML Diagram Description Example
Class Diagram Shows classes, attributes, methods & relationships User, Post, Comment classes in social media
Use Case Diagram Shows user interactions with the system Browse, Add to Cart, Checkout in e-commerce
Sequence Diagram Shows object interactions in order of time Transfer money between accounts
Activity Diagram Shows workflow or process logic (like a flowchart) Login process steps

Key Diagrams in Detail

1. Class Diagram

2. Use Case Diagram

3. Sequence Diagram

4. Activity Diagram

Object-Oriented Concepts in UML

Concept Role in UML
Class Blueprint of objects
Object Instance of class, modular system parts
Inheritance Child inherits from parent
Abstraction Show essential, hide unnecessary details
Encapsulation Bind data + restrict access
Polymorphism Same function, different behaviors

UML Tools

Benefits of UML

User Interface (UI) Design

UI Design Principles

Principle Meaning
Structure Organize info clearly and logically
Simplicity Keep it minimal and user-friendly
Visibility Show only what’s needed; don’t overwhelm the user
Feedback Give response to user actions (e.g., message, animation)
Tolerance Allow undo/redo; prevent user errors

User Interface Design Process

Phase 1: User, Task, and Environment Analysis

Phase 2: Interface Design

Phase 3: Interface Construction

Phase 4: Interface Validation

Unified Design Process (UDP)

Phases of UDP

Phase Purpose Example (Pet Grooming App)
1. Inception Define project purpose, goals, users, high-level needs Understand what the app will do (book grooming services)
2. Elaboration Refine requirements, assess risks, plan architecture Detail features (payment, profiles), create system models
3. Construction Develop software, perform testing, write documentation Build core features like booking and payments
4. Transition Deliver, test, and launch software Launch app, fix bugs, support users during rollout

Key Concepts

  1. Iteration and Incremental Development

    • System is built and improved in small, testable steps
    • Example: First release = booking; next = ratings, reminders
  2. Use Cases

    • Describe user interactions with the system
    • Example: User searches, selects groomer, books appointment
  3. Models and Diagrams

    • Show system structure, flow, and component interactions
    • Example: Diagram showing how bookings link to users & payments

Benefits of UDP

What is SCM?

Key SCM Processes

Process Description Example
1. Version Control Tracks every code change using tools like Git, SVN Developer A and B work independently and merge later
2. Baseline Management Maintains a stable reference point for rollback Version 1.0 = stable; revert if 1.1 fails
3. Change Management Handles, documents, and approves change requests "Dark mode" requested → reviewed → added safely
4. Build Management Compiles and automates code building (Jenkins, Maven) Jenkins builds site from latest code
5. Release Management Plans, tests, and delivers new software versions Testing app on devices before App Store release
6. Configuration Auditing Checks if software components are correct and authorized Ensures all patches are present before deployment

Advanced SCM Features

Feature Description
Branching & Merging Separate lines of work → merged later
Conflict Resolution Git resolves clashes in code changes
CI/CD Integration Automates testing + deployment after code updates

Why SCM is Important

Real-Life SCM Examples

What is Software Configuration Management (SCM)?

IEEE Definition

SCM is the process of identifying and defining the items in the system, controlling changes throughout their life cycle, tracking status, and verifying completeness and correctness of items.

SCM Objectives

Key Components of SCM

Component Description
1. Configuration Identification Identify all SCIs (e.g., code, SRS, test plans), assign unique names
2. Change Control Manage changes through review, approval, and implementation (per IEEE)
3. Configuration Status Accounting Track CR status, assigned personnel, time taken, and completeness
4. Configuration Auditing Verify compliance with standards and check if processes were followed

Examples of SCIs

Baselines (Per SDLC Phase)

Phase Baseline
Requirements SRS (Software Requirement Spec)
Design Design Specification
Coding Source Code
Testing Test Plans, Test Data
Release Operational Software

Software Release Management

SCM Plan (What It Contains)

  1. Introduction: Scope, definitions
  2. Management: Roles, responsibilities, baseline control
  3. Activities: Identification, change control, status accounting, auditing
  4. Tools & Techniques: CM tools and processes
  5. Supplier Control: Vendor software coordination
  6. Record Retention: Archiving logs, documents, approvals

Constraints on SCM

Organizational Context

1. What is Software Testing?

2. Why It’s Important

3. Manual vs Automation Testing

Feature Manual Testing Automation Testing
Speed Slow Fast
Human Involvement High Low
Best For Usability, Exploratory, Ad-hoc Regression, Load, Performance
Tools Required No Yes (e.g., Selenium, JUnit, Appium)

4. STLC (Software Testing Life Cycle)

  1. Requirement Analysis – Understand what to test
  2. Test Planning – Define scope, strategy, budget
  3. Test Case Design – Write test cases + expected results
  4. Test Environment Setup – Prepare test system
  5. Test Execution – Run tests, log bugs
  6. Test Closure – Analyze results, prepare summary

5. Types of Testing

Functional Testing ("What system does")

Non-Functional Testing ("How system performs")

Other Testing Types

6. Common Testing Terms

Term Meaning
Test Case Step-by-step instruction with expected result
Test Suite Group of test cases
Defect/Bug Error in software
Test Scenario High-level idea of what to test
Test Plan Strategy and scope of testing
Test Coverage % of code covered by tests

7. Why Automation Testing?

Popular Tools

Tool Purpose
Selenium Web automation
JUnit Java unit testing
JMeter Performance testing
Appium Mobile testing

When to Use

8. Interview Questions Quick Review

Question Answer Summary
Verification vs Validation Verification = building right product; Validation = built right?
Smoke vs Sanity Smoke = basic build check; Sanity = minor fix check
Black Box vs White Box Black Box = no code knowledge; White Box = full code knowledge
Regression Testing Ensures new code doesn't break existing features
Test Case Document with steps + expected result
Login Page Test Cases Valid/invalid login, empty fields, masking, attempt limits