BCSE301L Module3 Ebook
BCSE301L Module3 Ebook
BCSE301L
MODULE 3
PRP-217-4
Chapter 1: Software Requirements
Software requirements are the descriptions of the services that a software system should provide and
the constraints under which it must operate. They essentially define what the software should do to
meet the needs of its users and stakeholders.
This encompasses the functionalities and features expected from the system. Examples include:
Constraints on Operation
These are limitations or restrictions on how the software should function. Examples include:
Business Requirements The high-level goals and objectives that a software system must
achieve to support the organization's strategic business needs. They
focus on the 'why' behind the software and its impact on the
business.
Functional Requirements Describe the specific functions that the software must perform.
Non-Functional Describe the quality attributes of the software, such as performance,
Requirements usability, and security.
User Requirements Describe the needs and expectations of the end-users of the
software.
System Requirements Describe the overall requirements of the entire system, including the
software and hardware components.
Chapter 2: Software Requirements Engineering
Overview
• Finding
• Analyzing
• Documenting
• Checking requirements.
Requirements To analyze the elicited information, Use case analysis, data flow
Analysis identify conflicts, and prioritize diagrams, requirement
requirements. decomposition, risk analysis.
Requirements To ensure that the requirements are Reviews and inspections, prototyping,
Validation correct, complete, consistent, and testing.
feasible.
Requirements Discovery and Interact with stakeholders to gather information through interviews,
Understanding workshops, surveys, etc. Identify domain requirements and
constraints.
Requirements Classification Group related requirements and organize them into a coherent
and Organization structure. Use techniques like viewpoints or associate
requirements with system subsystems.
Interview
Purpose: To understand stakeholder needs and how they might use a new system.
Ethnography
An observational technique that involves immersing oneself in the work environment of stakeholders to
understand actual work practices, social interactions, and organizational context.
Benefits Limitations
Category Question
External Interfaces How does the software interact with people, the system's hardware,
other hardware, and other software?
Performance What is the speed, availability, response time, recovery time of various
software functions?
Design Constraints Are there any required standards in effect, implementation language,
policies for database integrity, resource limits, operating
environment(s)?
Characteristic Description
Valid (Correct) Expresses only the real needs of the stakeholders. Doesn't contain
anything that isn't required.
Complete Specifies all the things the system must do and all the things it must not
do! Includes responses to all classes of input and no TBDs.
Stories Scenarios
• Effective for setting the big picture and • Structured with inputs, outputs, normal
facilitating broad discussions. flow, error handling, and system state.
• Can gather input from a wider audience • Can be used to derive specific system
(e.g., through wikis). requirements.
Example:
• Story: A teacher uses the iLearn system to support student projects on the fishing industry.
• Scenario: A student uploads photos to the KidsTakePics system. The teacher moderates the
photos before they are shared.
Purpose Description
Understanding and System models help stakeholders comprehend the structure and behavior
Analysis of the system, breaking down complexity into manageable parts.
Validation They enable testing of the system's design against requirements to ensure
it meets stakeholder expectations.
Context Models Illustrate the system's environment and its UML & DFD
interactions with external entities to define system
boundaries.
Structural Models Represent the organization of the system's UML & ERD
components and their relationships, often using
class or ER diagrams.
Modelling Techniques
• Data Flow Diagrams (DFD) – Used for Context and Data models.
What is a DFD?
➢ A Data Flow Diagram (DFD) is a graphical representation that illustrates the flow of data within a
system.
➢ It serves as a powerful tool for visualizing and understanding how information is processed, stored,
and communicated.
• Visualization: Provides a clear and concise visual representation of how data flows through a
system.
• System Analysis: Can be used to analyze existing systems or model new ones.
DFD Components
Processes Rounded Transform input data into output data. Each process
rectangles is labeled with a verb phrase describing its function.
Data Stores Open-ended Represent locations where data is stored for later
(Warehouses) rectangles use. Data can flow into and out of these stores.
Levels of DFDs
Level Description
Context Diagram (Level 0) The highest-level DFD, showing the system as a single process with
external entities.
Level 1 DFD Decomposes the context diagram into major processes and data
flows.
Level 2 DFD Further decomposes Level 1 processes into more detailed processes
and data flows.
Level 3 DFD Decomposes Level 2 processes into even more detailed processes
and data flows.
Advantages Disadvantages
• Provides a clear overview of data flow • Can become complex if too many
within a system. elements are included.
• Helps in identifying potential issues in data • May require significant time to create and
handling. maintain.
• Serve Product
• Collect Payment
• Produce Product
• Store Product
What is an ER Model?
➢ Represents the logical design of a database by abstracting real-world objects as entities and their
associations as relationships.
➢ Example: Entities 'Student' and 'School' with the relationship 'Studies in'.
Core Concepts
Concept Description
Entity Set A collection of similar entities (e.g., 'Student' entity set). Individual
instances are entities (e.g., 'Ram').
Super Key One or more attributes that uniquely identify an entity (e.g., grade + roll
number in a school).
Candidate Key A minimal subset of a super key (super key without extraneous attributes).
Weak Entity An entity dependent on another entity for its identification (doesn't have its
own super key). Example: 'Family' (weak entity) dependent on 'Employee'
(owning entity).
Entity Generalization/Specialization
Represents hierarchical relationships between entity sets. A generalized entity (e.g., 'Person') can have
specialized subtypes (e.g., 'Customer,' 'Employee'). Uses 'ISA' hierarchy.
Mapping Cardinalities
Cardinality Description
One-to-One (1:1) One entity in E1 relates to at most one entity in E2, and vice versa.
One-to-Many (1:N) One entity in E1 relates to zero or more entities in E2. One entity in E2
relates to at most one entity in E1.
Many-to-One (N:1) Many entities in E1 relate to one entity in E2. One entity in E2 relates to
at most one entity in E1.
ER Diagram
From a given problem statement, we identify the possible entity sets, their attributes, and relationships
among different entity sets. Once we have this information, we represent them pictorially as an
Entity-Relationship (ER) diagram.
Chapter 6: Unified Modelling Language (UML)
What is UML?
UML is a standardized modeling language used in software engineering for visualizing, specifying,
constructing, and documenting the artifacts of software systems.
Purpose Description
Specification Can be used to specify the components of a software system in a precise and
unambiguous way. Helps ensure that everyone on the development team has
a shared understanding of the system's design.
Construction While UML itself isn't code, it can be used to generate code in various
programming languages, speeding up the development process and reducing
errors.
Structural Model (Static View) Class Diagram, Component Diagram, Deployment Diagram,
Object Diagram
Behavioral Model (Dynamic View) Sequence Diagram, Collaboration Diagram, State Chart
Diagram, Activity Diagram
Overview
➢ Provide a shared understanding of system functionality among end-users, developers, and domain
experts.
➢ Capture system functionality (use cases) and users (actors) from a problem statement.
➢ Behavioral UML diagram showing a graphical overview of system functionality.
➢ Consist of use cases (actions), actors (users/external systems), and their relationships.
Key Elements
Element Description
Actor External entity (human, device, or system) interacting with the system for a
purpose. • Primary Actor: Principal user achieving goals through system
services (e.g., customer withdrawing cash). • Supporting Actor: Provides
services to the system (e.g., bank representative restocking ATM).
Use Case A specific functionality provided by the system (e.g., withdraw cash, check
balance). Includes both successful and unsuccessful interaction scenarios.
Subject The system under consideration (e.g., ATM). Use cases apply to the subject.
Association Connection between actors and use cases, showing interaction (message
passing). Actors must be associated with at least one use case, and vice
versa.
Guidelines
• Who benefits most from the system? • Determine actor goals (functionality they
(Primary actors) want).
• Who keeps the system working? • Use case names start with a verb (e.g.,
'Check Balance').
Overview
➢ Activity diagrams are behavioral diagrams that visually represent the flow of control in a system.
➢ They are like flowcharts but can represent concurrent activities.
➢ They can't depict message passing among objects and thus can't be directly translated into code.
➢ Activity diagrams are suitable for confirming logic with business users, especially when the
business logic is complex.
Components
Initial Node Filled circle The starting point of the activity flow.
Final Node Filled circle with border The ending point of the activity flow.
Flow Directed arrow Shows the transfer of control. May include guard
conditions.
Merge Diamond shape (multiple Processing continues when at least one control
in, 1 out) reaches the node.
Fork Black bar (1 in, multiple Indicates the start of parallel activities.
out)
Join Black bar (multiple in, 1 Synchronizes concurrent activities; all incoming
out) controls must be completed.
Overview
➢ A statechart diagram is a visual representation of a system, showing its states and the events that
cause transitions between them.
➢ It models the behavior of a system with well-defined states.
➢ Statechart diagrams are typically used to model complex systems.
Components
Initial State Filled black circle The state an object is in when created.
Final State Unfilled circle with inner A state from which the object does not move to
black-filled circle another state.
Intermediate State Rounded rectangle Any state that is not initial or final. Contains
Name, Internal transitions (Entry/Exit/Do/Include
actions).
Guard Condition Precondition in brackets Precondition(s) that must be true for the
(optional) transition to happen.
Action Expression Action after / (optional) Action(s) performed as a result of the transition.
Guidelines
• If the order is accepted and we have the items available, we transition to the Fulfilled Order
state.
• However, if the items are not available, we transition to the Pending Order state.
Sequence Diagram
A Sequence Diagram shows object interactions and message passing over time.
Activation Box Narrow rectangle on lifeline Shows when the object is active.
Return Message Dashed arrow with open Value returned from a message call.
arrowhead
Guard Condition [condition] on arrow Condition that must be true for message to be
sent.
Class Diagram
A Class Diagram is a graphical representation of a system's static structure, showing classes, their
attributes, operations, and relationships.
Class Structure:
• Class Name: Unique identifier for the class.
Composition Filled diamond on the Strong 'part-whole' relationship where the whole
whole side owns the parts. Part lifecycle depends on the
whole.
Generalization Hollow triangle arrow 'ISA' relationship. Derived classes inherit properties
(Inheritance) (child → parent) from parent classes.
Examples:
• If a branch is closed, departments may still • If the shopping mall is demolished, all its
exist or be moved elsewhere. branches automatically cease to exist.
Chapter 11: UML – Component & Deployment Diagrams
Component Diagram
➢ Models the physical parts of a system like files, executables, and libraries.
➢ Provides a visual representation of the components and their relationships, helping to form an
executable system.
➢ Each component is a single, replaceable unit with hidden implementation details, communicating
through interfaces.
Interfaces Lollipop (provided) and Define how components interact with each
socket (required) notation other. Components provide and require
interfaces.
Deployment Diagram
Device Nodes 3D box (cube shape) Hardware devices (e.g., servers, PCs, mobile
phones) or software execution environments
(e.g., operating systems, JVMs). Most important
part of the diagram.
Communication Paths Solid lines between Show communication links between nodes. Can
nodes be labeled with communication protocols (e.g.,
HTTP, TCP/IP).
Deployment Dashed arrow labeled Shows how artifacts are deployed to nodes.
'deploy'
Class Diagram Structural Visualizes a system's classes, their properties, and the
relationships between them. Foundation for component and
deployment diagrams.
Object Diagram Structural Shows the relationship between objects using real-world
examples. Illustrates how a system will look at any given
time.
Use Case Diagram Behavioral Used during analysis to identify system functionality by
describing interactions of people or external devices with the
system. Provides a high-level overview for non-technical
audiences.
Sequence Diagram Behavioral Describes how operations are carried out. Depicts the
chronologically structured event flow through a use case and
presents communication relationships between objects.
State Diagram Behavioral Models the dynamic nature of a system by describing all
possible states of an object as events occur, from creation to
termination.