Docsity

Software_Requirements_Analysis_and_Design, Study Guides, Projects, Research of Software Engineering

Partial preview of the text

Download Software_Requirements_Analysis_and_Design and more Study Guides, Projects, Research Software Engineering in PDF only on Docsity!

Software Requirement Analysis

& Design

A Comprehensive Guide for Students

Unit-2 | 9 Hours

Topics Covered:

3 Software Requirement Analysis 3 Structured Analysis & Object-Oriented Analysis 3 Software Requirement Specification & Validation 3 Software Design Fundamentals & Methodology 3 Introduction to UML Diagrams

Created: August 2026

Table of Contents

  • Part 1: Software Requirement Analysis............
    • 1.1 What is Software Requirement Analysis?............
    • 1.2 Structured Analysis............
    • 1.3 Object-Oriented Analysis............
    • 1.4 Software Requirement Specification............
    • 1.5 Validation............
  • Part 2: Software Design and Implementation............
    • 2.1 Design Fundamentals............
    • 2.2 Structured Design Methodology............
    • 2.3 Object-Oriented Design Methodology............
    • 2.4 Design Verification............
  • Part 3: Introduction to UML............
    • 3.1 What is UML?............
    • 3.2 USE Case Diagrams............
    • 3.3 Object Diagrams............
    • 3.4 Class Diagrams............

2. Entity-Relationship Diagram (ERD): Shows the data and how different entities (like customers, accounts, transactions) relate to each other.

Example: A Student can have many Courses, and a Course can have many Students. This relationship is shown in an ERD.

3. Process Specifications: Detailed descriptions of what each process does, written in simple language or pseudocode.

Advantages of Structured Analysis:

  • Easy to understand for non-technical people
  • Focuses on data and processes
  • Good for traditional business systems
  • Uses visual diagrams that are clear

1.3 Object-Oriented Analysis

Object-Oriented Analysis (OOA) is a different approach that views the system as a collection of objects that interact with each other. An object is something that has properties (attributes) and actions (methods).

Real-World Example:

Imagine a car. A car is an object that has:

Attributes (Properties): Color, Speed, Fuel Level, Brand Methods (Actions): Start(), Stop(), Accelerate(), Brake()

Key Concepts in OOA:

Class A blueprint or template for creating objects. Example: 'Car' is a class

Object An instance of a class. Example: 'My blue Honda' is an object of the Car class Attribute Properties of an object. Example: Color, Brand, Speed Method Actions an object can perform. Example: Start(), Stop(), Accelerate() Encapsulation Bundling data and methods together and hiding internal details

Advantages of Object-Oriented Analysis:

  • Models real-world entities naturally
  • Code is reusable and maintainable
  • Easy to scale and extend
  • Reduces complexity in large systems

1.4 Software Requirement Specification (SRS)

An SRS is a formal document that describes exactly what the software should do. It's like a detailed contract between the client and the development team. Everyone refers to this document to ensure the final product meets all expectations.

What Should an SRS Contain?

Section Description

Project Overview What is the project about? What problem does it solve? Functional Requirements What should the system do? List all features Non-Functional RequirementsPerformance, security, reliability requirements User Characteristics Who will use the system? What's their technical level? System Constraints Hardware, software, or legal limitations Assumptions & DependenciesWhat assumptions are we making?

Example of a Requirement:

REQ-001: The system shall allow users to create an account using their email address and password. The password must be at least 8 characters long and contain at least one number and one special character. 3 Clear • 3 Measurable • 3 Specific

1.5 Validation of Requirements

Validation means checking that the requirements are correct, complete, and achievable. It's like proofreading before submitting an assignment. We want to catch errors early!

Types of Validation:

Completeness Check Are all requirements written? Is nothing missing?

Consistency Check Do any requirements contradict each other? Feasibility Check Can we actually build this with available resources? Traceability Check Can we trace each requirement to the final software?

PART 2: SOFTWARE DESIGN AND

IMPLEMENTATION

2.1 Software Design Fundamentals

After we understand WHAT the software should do (Requirements), we need to figure out HOW to build it. This is called Design. Design is like creating a blueprint for a house before you start building it.

A good design should be modular (made of separate, independent pieces), maintainable (easy to fix and update), efficient (uses resources wisely), and scalable (can grow with new requirements).

Design Process Steps:

1 Understand RequirementsReview the SRS document carefully

2 Identify Components Break system into modules/components 3 Define Interfaces How do components communicate? 4 Choose Technology What programming language, database, etc.? 5 Create Design Documents Write detailed design specifications 6 Review & Approve Get stakeholder approval before coding

Key Design Principles:

Modularity Divide the system into independent modules

Cohesion Elements within a module should be closely related Coupling Minimize dependencies between modules Abstraction Hide complex details, show only necessary information Reusability Design components that can be used in multiple places

2.2 Structured Design Methodology

Structured Design is an approach to design that emphasizes breaking down the system into smaller, manageable pieces. It focuses on data flow and process hierarchy.

Main Characteristics:

  • Top-Down Approach: Start with the big picture, then break it into smaller parts
  • Functional Decomposition: Divide system by what it does, not by data
  • Data Flow Focus: Emphasizes how data moves through the system
  • Procedure-Oriented: Focuses on functions and procedures

Tools Used in Structured Design:

1. Structure Charts: Shows the hierarchy of modules and how they call each other. It's like showing the organization structure of a company - the main function is at the top, and it calls smaller functions below it.

Example: A banking system's structure chart might show: Main Program → Account Operations → Deposit/Withdraw/Transfer functions

2. Pseudocode: Writing the logic of each module in a simple, language-independent way before actual coding.

Advantages of Structured Design:

  • Easy to understand and maintain
  • Good for business and traditional applications
  • Clear separation of functions
  • Easy to test each module separately

Disadvantages of Structured Design:

  • Not ideal for large, complex systems
  • Difficult to modify once coded
  • Not aligned with real-world object modeling
  • Code reusability is limited

2.3 Object-Oriented Design Methodology

Object-Oriented Design (OOD) applies the concepts of Object-Oriented Analysis to create the actual design. Instead of thinking about functions, we think about objects, their properties, and how they interact.

Core OOD Concepts:

Encapsulation Bundle data and methods together. Hide internal details from outside.

Inheritance Classes can inherit properties and methods from parent classes

3 Is the design modular and maintainable?

3 Can each module be tested independently?

3 Are there any conflicts or inconsistencies?

3 Is the design efficient and scalable?

PART 3: INTRODUCTION TO UML

3.1 What is UML?

UML stands for Unified Modeling Language. It's a standard visual language for showing how systems work. Think of UML as a universal language that developers worldwide use to communicate system designs. Instead of writing long descriptions, we use diagrams!

UML provides 13 different types of diagrams to show different aspects of a system. In this course, we'll learn about the three most important ones.

Why Use UML?

  • Universal Language: Developers worldwide understand UML
  • Visual Communication: Pictures are clearer than long descriptions
  • Easy to Modify: Quickly make changes to the diagram
  • Documentation: Serves as project documentation
  • Quality: Helps catch design problems early
  • Tool Support: Many software tools support UML

3.2 USE Case Diagrams

A USE Case diagram shows what the system does from the user's perspective. It shows the interactions between users (actors) and the system.

Key Components of a USE Case Diagram:

Actor A user or external system that interacts with the system (shown as a stick figure)

USE Case A specific interaction or task the system can do (shown as an oval) System Boundary A rectangle showing what's inside the system Association A line connecting actors to USE cases they interact with

Real-World Example: ATM System

In an ATM system:

Class: BankAccount (with attributes: accountNumber, balance, accountHolder) Objects:

_- Account1: accountNumber = 'A001', balance = 50000, accountHolder = 'John'

  • Account2: accountNumber = 'A002', balance = 30000, accountHolder = 'Sarah' An Object Diagram would show these two specific account instances with their actual values._

When to Use Object Diagrams:

  • To show specific examples of classes
  • To illustrate system state at a particular time
  • To show how objects interact in a real scenario
  • To document test data and system snapshots

3.4 Class Diagrams

A Class Diagram is the most important UML diagram. It shows classes , their attributes , methods , and how classes relate to each other. It's like a blueprint of your entire system.

Structure of a Class in a Diagram:

Top Section Class Name (in bold)

Middle Section Attributes (properties with data types) Bottom Section Methods (operations/functions)

Example: Student Class

Class Name: Student Attributes:

_- studentID: int

  • name: String
  • email: String
  • gpa: float_ Methods: _- getGPA(): float
  • updateEmail(newEmail): void
  • calculateScore(marks): float_

Visibility Symbols (Access Modifiers):

+ (Plus) Public: Can be accessed from anywhere

  • (Minus) Private: Can only be accessed within the class

(Hash) Protected: Can be accessed by the class and its subclasses

~ (Tilde) Package: Can be accessed within the same package

Relationships Between Classes:

Association A connection between two classes. Example: Student studies a Course

Inheritance One class inherits from another. Example: Car inherits from Vehicle Composition One class contains another. Example: A Car contains an Engine Aggregation A part-of relationship (weaker than composition). Example: A Team has Players

Inheritance Example:

Parent Class: Vehicle Attributes: color, speed, fuel Methods: start(), stop(), accelerate()

Child Class: Car Inherits all from Vehicle Additional: numberOfDoors, trunkSize Additional Methods: openTrunk(), closeTrunk()

The inheritance line is shown with an arrow pointing from Car to Vehicle.

Multiplicity (How Many?):

When showing relationships, we use numbers to show how many objects are involved:

1 Exactly one

0..1 Zero or one

  • Zero or more 1..* One or more 2..5 Between 2 and 5

Example: One Student can enroll in many Courses (1 Student → * Courses). One Course has many Students (* Students → 1 Course).

Benefits of Class Diagrams:

  • Shows complete structure of the system
  • Clear visualization of class relationships
  • Helps implement the system in code

Conclusion

In this document, we've covered the essential topics of Software Requirement Analysis and Design:

Requirements Phase: We learned how to understand what a system should do using Structured Analysis and Object-Oriented Analysis. We document requirements in an SRS and validate them to ensure correctness and completeness.

Design Phase: We learned how to design systems using Structured and Object-Oriented methodologies. A good design follows principles like modularity, cohesion, and low coupling.

UML Diagrams: We explored three important UML diagrams: USE Case Diagrams (showing system interactions), Object Diagrams (showing real instances), and Class Diagrams (showing system structure).

Understanding these concepts is crucial for becoming a successful software developer or analyst. Whether you follow Structured or Object-Oriented approaches, the goal is always the same: to create systems that meet user needs, are well-organized, and easy to maintain.

Remember: Software development is not just about writing code. It's about understanding problems, designing solutions, and communicating with team members. These skills will serve you throughout your career!

Quick Reference: Key Terms Glossary

Requirement Something the system should do or a quality it should have

SRS Software Requirement Specification - formal document of all requirements Design The blueprint of how to build the system Module A self-contained, independent unit of a system Class A template or blueprint for creating objects Object An instance of a class with specific values Attribute A property or data of a class/object Method An action or operation that a class/object can perform Inheritance When one class extends another and inherits its properties Polymorphism Ability of objects to respond differently to the same message Encapsulation Bundling data and methods together, hiding internal details UML Unified Modeling Language - standard for system design diagrams USE Case A specific interaction between an actor and the system Actor A user or external system that interacts with the system Association A relationship between two classes or objects Composition One class contains another class (strong relationship) Aggregation A class is part of another class (weaker relationship)