BCS501 Module 2
BCS501 Module 2
Module-02
Requirements Engineering
Requirements Engineering:
Inception Stage:
Elicitation Stage:
Elaboration Stage:
Negotiation Stage:
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Specification Stage:
Validation Stage:
o Technical reviews are conducted to ensure requirements are clear, complete, and
correct, involving a review team of engineers, customers, users, and stakeholders.
Identifying Stakeholders:
Different stakeholders have different views and priorities for the system.
Marketing focuses on marketable features, business managers on budget and
timelines, end users on usability, software engineers on technical
infrastructure, and support engineers on maintainability.
Collect and categorize stakeholder information to address inconsistenciesand
conflicts in requirements.
Initial Q&A sessions are useful for the first encounter but should evolve into a
more dynamic format involving problem-solving, negotiation, andspecification
for effective requirements elicitation.
Eliciting Requirements
1. Normal Requirements:
o Objectives and goals explicitly stated by the customer (e.g., specific
system functions, performance levels).
2. Expected Requirements:
o Fundamental requirements implicit to the product (e.g., ease ofuse,
reliability, installation ease). Absence leads to dissatisfaction.
3. Exciting Requirements:
o Unexpected features that delight customers (e.g., innovative
capabilities like multitouch screens in smartphones).
Usage Scenarios:
Creating scenarios (or use cases) helps to understand how different user classes will use the
system. These scenarios describe the system's functions and features inpractical use,
aiding in the transition to technical software engineering activities.
The outputs of requirements elicitation vary by project size but typically include:
1. Statement of Need and Feasibility: Clarifies the necessity and practicality ofthe
project.
2. Bounded Statement of Scope: Defines the system or product's boundaries.
3. List of Participants: Documents the customers, users, and stakeholders involved.
4. Technical Environment Description: Details the system’s operational context.
5. Requirements List: Organized by function, with domain constraints foreach
requirement.
6. Usage Scenarios: Provide insights into system use under different conditions.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Each work product is reviewed by all participants to ensure accuracy and completeness.
Cases
Alistair Cockburn defines a use case as a description of the system's behavior as it responds
to requests from its stakeholders, capturing a contract between the stakeholders and the
system. A use case typically tells a story about how an end userinteracts with the system
under specific circumstances.
1. Actors:
o Definition: Actors are entities that interact with the system,
playing specific roles. These can be people or devices.
o Primary Actors: Directly interact with the system to achieve a goal.
o Secondary Actors: Support the system so that primary actors can
perform their roles.
o Example: For a home security system, actors might includethe
homeowner, setup manager, sensors, and monitoring subsystem.
2. Identifying Actors:
o Not all actors are identified in the first iteration; primary actors are
identified early, and secondary actors are added as understanding ofthe
system evolves.
3. Developing Use Cases:
o Questions to Answer:
Who are the primary and secondary actors?
What are the actors’ goals?
What preconditions should exist?
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
System Actors:
Homeowner
Setup Manager
Sensors
Monitoring Subsystem
Homeowner Interactions:
Entering a password
Inquiring about the status of security zones and sensors
Pressing the panic button
Homeowner checks"stay"
Homeowner selects if theorsystem
"away"istoready viathe
activate thesystem.
control panel.
The
Homeowner
system enters
confirms a four-digit
activation with a password.
visual indicator.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Open Issues:
Model
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
There are various ways to represent requirements for a computer-based system, and different
modes of representation can provide different perspectives, helping to uncoveromissions,
inconsistencies, and ambiguities. Here are some common elements in most requirements
models:
Scenario-Based Elements
Scenario-based elements describe the system from the user's point of view, often
starting with basic use cases and evolving into more elaborate template-based usecases.
These scenarios serve as input for creating other modeling elements.
Class-Based Elements
Each usage scenario implies a set of objects manipulated by the actor interacting withthe
system. These objects are categorized into classes, collections of things with similar
attributes and behaviors. Class diagrams, such as a UML class diagram, depictthese classes
and their relationships, showing attributes and operations that can modify these attributes.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Behavioral Elements
The behavior of a system is critical to its design and implementation. Behavioral modeling
elements, such as state diagrams, depict the system's states and the events that cause state
changes. These diagrams also indicate actions taken as a consequence of specific events.
Behavioural modelling extends to individual classes, detailing their specific behaviours.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Flow-Oriented Elements
Analysis Patterns
Analysis patterns are reusable solutions for common problems within a specificapplication
domain. These patterns provide two main benefits:
Analysis patterns are referenced by name within the analysis model and stored in a
repository, making them accessible for reuse by requirements engineers. Information
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
For the SafeHome system, consider the homeowner actor. The interactions include:
Entering a password
Inquiring about the status of security zones and sensors
Pressing the panic button
Activating/deactivating the system
Exceptions:
1. System not ready: Homeowner checks and closes all sensors.
2. Incorrect password: Homeowner re-enters the correct password.
3. Password not recognized: Contact support to reprogram.
4. "Stay" selected: Perimeter sensors activated.
5. "Away" selected: All sensors activated.
Priority: Essential
When Available: First increment
Frequency of Use: Regular
Channels to Actor: Via control panel
Secondary Actors: Support technician, sensors
Channels to Secondary Actors: Phone line, radio frequency interfaces
Open Issues:
o Alternate activation methods (e.g., abbreviated password)
o Additional text messages on the control panel
o Time limit for entering the password
o Deactivation options before activation
Use cases and other elements should be reviewed thoroughly to ensure clarity and completeness, as
ambiguities can indicate potential problems that need addressing.
Negotiating Requirements
In an ideal scenario, the tasks of inception, elicitation, and elaboration determine customer
requirements in sufficient detail to proceed seamlessly to subsequent software engineering
activities. However, this ideal is rarely achieved. In reality, negotiation with stakeholders
often becomes necessary to balance functionality, performance, and other product or system
characteristics against constraints like costand time-to-market.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
The primary goal of negotiation is to develop a project plan that meets stakeholder needs while
accommodating real-world constraints (e.g., time, budget, and personnel). The best
negotiations aim for a "win-win" outcome, where:
Negotiation Activities
Barry Boehm defines a set of negotiation activities to be conducted at the beginning ofeach
software process iteration. These activities are designed to ensure effective stakeholder
communication and to reconcile differing priorities and constraints. The activities include:
o Aim to create a scenario where all stakeholders feel their primary needsare
addressed.
o Ensure the negotiated plan is feasible within the given constraints.
1. Identification of Stakeholders:
o Homeowners (end-users)
o Setup managers (users with administrative roles)
o Monitoring and response subsystem operators
o Development team
o Budget managers
2. Determination of Win Conditions:
o Homeowners: Reliable security system with easy-to-use interface.
o Setup managers: Flexible configuration options.
o Monitoring subsystem: Seamless integration with existing systems.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
By addressing these negotiation activities, the project can move forward with a shared
understanding and commitment to the project's success.
Validating Requirements
Additional Considerations
By asking these questions, stakeholders and development teams can ensure that the requirements
model is comprehensive, clear, and aligned with the project's goals. This process helps in identifying
potential issues early, thereby reducing the risk of costly changes later in the development process.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Chapter:-2
Requirements Analysis
1. Scenario-Based Models:
o Focus on requirements from the perspective of various system actors.
2. Data Models:
o Depict the information domain for the problem.
3. Class-Oriented Models:
o Represent object-oriented classes (attributes and operations) andtheir
collaboration to achieve system requirements.
4. Flow-Oriented Models:
o Represent the functional elements of the system and data transformation.
5. Behavioral Models:
o Depict software behavior in response to external events.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
6. Simplicity:
o Keep models simple and avoid unnecessary complexity.
Domain Analysis
Structured Analysis:
o Data Object Modeling:
Data and Process Separation:
Defines attributes and relationships of data objects.
Treats data and the processes that transform it as separate entities.
o Process Modeling:
Shows how processes manipulate data as it flows through the system.
3. Combining Approaches:
o Choosing an Approach:
o Scenario-Based Elements:
Depict user interactions with the system and the sequence of activities.
o Class-Based Elements:
Model objects the system will manipulate, the operations onthese
objects, relationships (including hierarchical), and
collaborations between classes.
o Behavioral Elements:
o Flow-Oriented Elements:
o Project-Specific Content:
o Simplicity Principle:
Only those modeling elements that add value to the model shouldbe
used to keep the modeling process simple.
User Satisfaction:
User satisfaction is the primary measure of a computer-based
system or product's success.
Understanding end user interactions helps in characterizing
requirements and building effective models.
Begins with creating use cases, activity diagrams, and swimlane diagrams.
Use cases capture interactions between users (actors) and the system.
The requirements gathering team develops use cases for each of the functions noted. In general, use cases
are written first in an informal narrative fashion. If more formality is required, the same use case is
rewritten using a structured format. To illustrate, consider the function access camera surveillance via the
Internet— display camera views (ACS-DCV). The stakeholder who takes on the role of the homeowner
actor might write the following narrative:
Use case: Access camera surveillance via the Internet—display camera views (ACS-DCV)
Actor: homeowner
If I’m at a remote location, I can use any PC with appropriate browser software to log on to the
SafeHome Products website. I enter my user ID and two levels of passwords and once I’m validated, I have
access to all functionality for my installed SafeHome system. To access a specific camera view, I select
“surveillance” from the major function buttons displayed. I then select “pick a camera” and the floor plan
of the house is displayed. I then select the camera that I’m interested in. Alternatively, I can look at
thumbnail snapshots from all cameras simultaneously by selecting “all cameras” as my viewing choice.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Once I choose a camera, I select “view” and a one-frame-per-second view appears in a viewing window
that is identified by the camera ID. If I want to switch cameras, I select “pick a camera” and
the original viewing window disappears and the floor plan of the house is displayed again.
I then select the camera that I’m interested in. A new viewing window appears.
A variation of a narrative use case presents the interaction as an ordered sequence of user actions. Each
action is represented as a declarative sentence. Revisiting the ACS-DCV function, you would write:
Use case: Access camera surveillance via the Internet—display camera views (ACS-DCV)
Actor: homeowner
1. The homeowner logs onto the SafeHome Products website.
2. The homeowner enters his or her user ID.
3. The homeowner enters two passwords (each at least eight characters in length).
4. The system displays all major function buttons.
5. The homeowner selects the “surveillance” from the major function buttons.
6. The homeowner selects “pick a camera.”
7. The system displays the floor plan of the house.
8. The homeowner selects a camera icon from the floor plan.
9. The homeowner selects the “view” button.
10. The system displays a viewing window that is identified by the camera ID.
11. The system displays video output within the viewing window at one frame per second.
Secondary Scenarios:
o Evaluate each primary scenario step for alternative actions, error conditions, and other
behaviors.
o Create secondary scenarios for alternative interactions and error conditions.
Example of Refinement:
o Identify secondary scenarios like viewing all camera thumbnails or handling error
conditions
Limitations:
o Quality depends on the author's clarity.
o Focuses on functional and behavioral requirements, not suitablefor
nonfunctional requirements.
o May not be sufficient for detailed and precise requirements,
especially in safety-critical systems.
Benefits:
o Scenario-based modeling is appropriate for most situations
encountered in software engineering.
o Properly developed use cases provide substantial benefits as a
modeling tool.
an Activity Diagram
Purpose: The UML swimlane diagram is a variation of the activity diagram designed
to represent the flow of activities within a use case while highlighting the responsibilities of
different actors or analysis classes. This is achieved by dividing thediagram into parallel
segments, resembling the lanes in a swimming pool.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Structure:
Example:
Context: Swimlane diagrams, like activity diagrams and use cases, are procedurallyoriented.
They focus on how various actors invoke specific functions or follow procedural steps to
meet system requirements.
Procedural View:
Information Space:
Entity-Relationship Diagram
(ERD) Entity-Relationship
Diagram (ERD):
Purpose: Represents all data objects that are processed within an applicationand
illustrates the relationships between these objects.
Components: Data objects, attributes, and relationships.
Data Objects
Example: A car can be a data object defined by attributes such as make, model, IDnumber,
body type, color, and owner.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Data Attributes
Identifier: One or more attributes that serve as keys to uniquely identify an instanceof the
data object. For example, the ID number for a car.
Example: For a department of motor vehicles, attributes for the data object car might
include make, model, ID number, body type, color, and owner. For a manufacturing control
software, additional attributes like interior code, drive train type, trim packagedesignator,
and transmission type might be needed.
Relationships
Definition: Connections between data objects that define how they interact or relateto one
another.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Class-Based Modeling
o Synonyms should be noted, and classes needed for the solution are part of
the solution space; those needed only for description are in theproblem
space.
o Example evaluation:
8. Notes:
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
1. Purpose of Attributes:
o Attributes define a class and clarify its meaning in the problem space.
o The relevance of attributes depends on the context in which theclass
is used.
2. Context-Specific Attributes:
o Attributes for the same class can vary significantly based on the
context of the system.
o Example:
For a baseball statistics system: name, position, batting
average, fielding percentage, years played, games played.
For a baseball pension system: average salary, credit towardfull
vesting, pension plan options chosen, mailing address.
3. Developing Attributes:
o Study each use case to identify relevant attributes that belong to the class.
o Answer the question: "What data items (composite and/or elementary) fully
define this class in the context of the problem at hand?"
4. Example: SafeHome System Class Attributes:
o Identification Information:
System ID
Verification phone number
System status
o Alarm Response Information:
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Delay time
Telephone number
o Activation/Deactivation Information:
Master password
Number of allowable tries
Temporary password
5. Composite Data Items:
o Each composite data item can be further broken down into elementarydata
items if needed.
o For practical purposes, composite data items provide a reasonablelist of
attributes.
6. Class vs. Attribute:
o Avoid defining an item as an attribute if multiple instances of the itemare
associated with the class.
o Example: Sensors are not attributes of the System class but are definedas a
separate Sensor class associated with the System class.
1. Purpose of Operations:
o Operations define the behavior of an object.
o They manipulate data, perform computations, inquire about object
states, or monitor for events.
2. Categories of Operations:
o Data manipulation: Adding, deleting, reformatting, selecting data.
o Computation: Performing calculations or processing data.
o State inquiry: Checking or retrieving the state of an object.
o Event monitoring: Watching for specific events to occur.
3. Relationship with Attributes and Associations:
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
By following these guidelines, operations for each class can be effectively identified
and defined, ensuring that the behavior of each object in the system is thoroughly
understood and documented.
CRC modeling is a technique used to identify and organize classes relevant to system
or product requirements. This model is typically represented using index cards, each
card detailing a class, its responsibilities, and its collaborators.
Identifying Classes
Identifying Responsibilities
Responsibilities are anything a class knows or does, including both attributes andoperations.
The following guidelines help in allocating responsibilities:
Identifying Collaborations
Collaborations represent requests from one class (client) to another (server) to fulfill a
responsibility. These collaborations are necessary when a class cannot fulfill a responsibility
on its own.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
3. Read Use Case: The review leader reads the use case, passing a token tothe
holder of the corresponding class card.
4. Describe Responsibilities: The cardholder describes the responsibilities,
verifying if they satisfy the use-case requirement.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
This process ensures the model accurately represents the requirements and guides furtherdevelopment.
Associations
Example: In the context of a floor plan system, a FloorPlan class may be associated with
Camera and Wall classes. Similarly, a Wall class might be associated with WallSegment,
Window, and Door classes.
Multiplicity: Associations can have multiplicity, which defines how many instancesof one
class are associated with instances of another class.
Multiplicity Notation:
Example of Multiplicity:
A Wall object can be constructed from one or more WallSegment objects (1..*).
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
A Wall object may contain zero or more Window objects (0..*) and zero ormore
Door objects (0..*).
The relationships and multiplicities can be illustrated in UML diagrams, as shown below:
Stereotypes: Dependencies are often defined using stereotypes, which are special modeling
elements with custom-defined semantics. In UML, stereotypes are enclosedin double angle
brackets (e.g., <<stereotype>>).
Example: In the SafeHome surveillance system, a Camera object (server class) provides
video images to a Display Window object (client class). This relationship is more complex
than a simple association and can be represented as a dependency.
Example of Dependency:
In this diagram, <<access>> implies that the use of the camera output by the
DisplayWindow is controlled by a special password.
Dependencies: Indicate that one class relies on another, often represented with
stereotypes to provide additional semantics. These relationships are crucial for
understanding the interactions and dependencies within a system.
Analysis Packages
Analysis packages are used in analysis modeling to group related elements, such as use
cases and analysis classes, into categorized units. This organization helps manage complexity
by structuring the model into coherent sections.
Consider a video game analysis model, which consists of numerous classes. These classes
can be categorized into different analysis packages based on their roles and functionalities
within the game.
Categories of Classes:
1. Game Environment:
o Classes that describe the visual scenes and environment elements theuser
sees during gameplay.
o Examples: Tree, Landscape, Road, Wall, Bridge, Building, VisualEffect.
2. Game Characters:
o Classes that define the physical features, actions, and
constraints of characters within the game.
o Examples: Player, Protagonist, Antagonist, SupportingRoles.
3. Game Rules:
o Classes that define the rules of the game, including how players
navigate the environment and interact with objects and characters.
o Examples: RulesOfMovement, ConstraintsOnAction.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Illustration:
Visibility Symbols
In UML, symbols are used to indicate the visibility of elements within and across
packages:
In Figure 6.15, the plus sign (+) before the class names indicates that these classes
have public visibility, meaning they can be accessed from other packages. Other
symbols (minus sign - for private and hash # for protected) are not shown in this
figure but are used similarly to control the visibility of elements.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Flow-Oriented Modeling
Flow-oriented modeling is a strategy for representing how data flows through a system and how
data is transformed as it moves from input to output. It emphasizes the movement of information
and the processes that manipulate it.
Flow-oriented modeling focuses on the transformation and movement of data within a system. It
typically involves tools like Data Flow Diagrams (DFDs) to represent processes, data stores,external
entities, and the flow of data between these components.
This modeling approach helps in understanding how information is processed and supports
requirement analysis by visualizing the system's functional aspects.
Processes:
Data Stores:
Data Flows:
o Shows the movement of data between processes, data stores, and external entities.
o Represents the "what" (data) that moves, not the control flow.
External Entities:
o Entities outside the system boundary that interact with the system (e.g., users, external
systems).
o They send data to or receive data from the system.
Hierarchical Decomposition:
System Boundaries:
o Defines the boundaries of the system being modeled, separating it from the external
environment.
o Each process in a DFD may have a corresponding process specification that details how
the process transforms the input into the output.
Helps in Requirement Analysis:
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT.
Behavioral Modeling
Behavioral modeling is typically employed during requirement analysis and system design to depict
the system's response to events.
Behavioral modeling highlights the dynamic nature of a system by modeling its responses tointernal
and external events.
Tools like State Diagrams, Sequence Diagrams, and Activity Diagrams are commonly used to
represent how the system or its components behave in different scenarios over time.
This modeling approach helps capture the dynamic requirements of a system, complementing static
models like class or component diagrams.
o Represents the states an object can be in and how it transitions from one state to anotherbased
on events.
o Shows the life cycle of an object or a component by defining states, events, transitions,and
actions.
o Useful for systems with significant event-driven behaviors (e.g., controllers, devices).
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT.
o Events: External stimuli or occurrences that trigger state transitions (e.g., user input,sensor
data).
o States: Conditions or situations in which an object can exist.
o Transitions: The movement from one state to another when an event occurs.
Sequence Diagrams:
Activity Diagrams:
o Focuses on the flow of activities within a system, showing the sequence and conditionsunder
which activities occur.
o Useful for modeling workflows or complex algorithms.
o Captures the flow of control and data between actions or activities.
o Describes how external actors (users or other systems) interact with the system.
o Focuses on user interactions and helps capture functional requirements.
o Represents various use cases the system must handle and the actors involved in each usecase.
o Similar to sequence diagrams but focuses more on the relationships between objectsrather
than the time sequence of messages.
o Shows how objects work together to perform a function.
BCS501 | SOFTWARE ENGINEERING & PROJECT MANAGEMENT.
Interaction Diagrams:
o Models the dynamic behavior between objects and their interactions to achieve a
specific outcome.
o Focuses on how objects collaborate through message passing and communication.
o Behavioral modeling captures the system's dynamic response to inputs, user actions, and
internal conditions.
o It reveals how the system behaves over time and under various conditions.
o Behavioral modeling works alongside static modeling (e.g., class diagrams) to provide a
complete view of the system.
o While static models describe structure, behavioral models describe behavior and
interactions.
Applications: