Module-02
Module-02
Module-02
Requirements Engineering
o Software development is engaging and creative but can lead to premature action
without proper understanding of requirements.
o Some developers argue that understanding evolves during the build, stakeholders
understand better with early iterations, and rapid changes make detailed
requirements unnecessary.
o These arguments have elements of truth but can lead to project failure if not
managed properly.
Requirements Engineering:
P a g e 1 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Inception Stage:
Elicitation Stage:
Elaboration Stage:
Negotiation Stage:
P a g e 2 | 52
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.
P a g e 3 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Identifying Stakeholders:
Defined as anyone who benefits directly or indirectly from the system being
developed.
Common stakeholders include business managers, product managers, marketing,
internal/external customers, end users, consultants, product engineers, software
engineers, and support/maintenance engineers.
Begin with an initial list of stakeholders and expand it by asking each stakeholder
for additional contacts.
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 inconsistencies and
conflicts in requirements.
P a g e 4 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Initial Q&A sessions are useful for the first encounter but should evolve into a
more dynamic format involving problem-solving, negotiation, and specification
for effective requirements elicitation.
Eliciting Requirements
P a g e 5 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 6 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
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 of use,
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 in practical 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 of the
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 for each
requirement.
6. Usage Scenarios: Provide insights into system use under different conditions.
P a g e 7 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Each work product is reviewed by all participants to ensure accuracy and completeness.
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 include the
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 of the
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?
What tasks or functions do the actors perform?
P a g e 8 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Actors:
o Homeowner
o Setup Manager
o Sensors
o Monitoring Subsystem
Homeowner Interactions:
o Entering a password
o Inquiring about the status of security zones and sensors
o Pressing the panic button
o Activating/deactivating the system
P a g e 9 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 10 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 11 | 52
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 uncover
omissions, 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 use cases. 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 with the
system. These objects are categorized into classes, collections of things with similar
attributes and behaviors. Class diagrams, such as a UML class diagram, depict these
classes and their relationships, showing attributes and operations that can modify these
attributes.
Behavioral Elements
P a g e 12 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 13 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Flow-Oriented Elements
Analysis Patterns
Analysis patterns are reusable solutions for common problems within a specific
application 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
P a g e 14 | 52
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
P a g e 15 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
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
P a g e 16 | 52
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
P a g e 17 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
o Aim to create a scenario where all stakeholders feel their primary needs are
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.
P a g e 18 | 52
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
P a g e 19 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Additional Considerations
P a g e 20 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
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.
P a g e 21 | 52
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) and their
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.
P a g e 22 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 23 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 24 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Domain Analysis
P a g e 25 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
By conducting domain analysis, software engineers can leverage common patterns and
classes across multiple projects, enhancing efficiency and fostering consistency in
software development.
1. Structured Analysis:
o Process Modeling:
P a g e 26 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
3. Combining Approaches:
o The book proposes a model that combines features of both structured and
object-oriented analysis.
o Choosing an Approach:
o Scenario-Based Elements:
Depict user interactions with the system and the sequence of activities.
o Class-Based Elements:
P a g e 27 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
o Behavioral Elements:
o Flow-Oriented Elements:
o Project-Specific Content:
The specific content and diagrams used to construct these elements may
vary from project to project.
o Simplicity Principle:
Only those modeling elements that add value to the model should be
used to keep the modeling process simple.
By understanding and effectively combining these approaches, software teams can create
comprehensive and useful models that accurately represent system requirements and
provide a solid foundation for design.
P a g e 28 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
User Satisfaction:
o User satisfaction is the primary measure of a computer-based system or
product's success.
o Understanding end user interactions helps in characterizing requirements
and building effective models.
P a g e 29 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
o A use case is a "contract for behavior," detailing how an actor uses a system
to achieve a goal.
o Captures interactions between information producers/consumers and the
system.
Secondary Scenarios:
P a g e 30 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 31 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Limitations:
o Quality depends on the author's clarity.
o Focuses on functional and behavioral requirements, not suitable for
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.
P a g e 32 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Example: An activity diagram for the ACS-DCV use case (Figure 6.5) shows
details like the limited number of attempts a user has to enter their user ID and
password.
Swimlane Diagrams
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 the diagram into parallel
segments, resembling the lanes in a swimming pool.
P a g e 33 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Structure:
Example:
Context: Swimlane diagrams, like activity diagrams and use cases, are procedurally
oriented. They focus on how various actors invoke specific functions or follow
procedural steps to meet system requirements.
Procedural View:
P a g e 34 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Information Space:
Data Requirements: Beyond the procedural view, it's essential to represent and
understand the data requirements of the system.
Upcoming Sections: Will explore how to model the information space to ensure
comprehensive coverage of all system requirements.
P a g e 35 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Purpose: Represents all data objects that are processed within an application and
illustrates the relationships between these objects.
Components: Data objects, attributes, and relationships.
Data Objects
Definition: A data object is a composite piece of information that is processed within the
system. It consists of multiple attributes.
Example: A car can be a data object defined by attributes such as make, model, ID
number, body type, color, and owner.
P a g e 36 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Data Attributes
Identifier: One or more attributes that serve as keys to uniquely identify an instance of
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 package
designator, and transmission type might be needed.
Relationships
Definition: Connections between data objects that define how they interact or relate to
one another.
P a g e 37 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Graphical Representation:
Simple Connection: Shows basic relationship (e.g., person and car are
connected).
Object/Relationship Pairs: Defines specific relationships (e.g., owns, insured to
drive).
Directionality: Arrows indicate the direction of the relationship, which helps in
reducing ambiguity.
Class-Based Modeling
P a g e 38 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
o Synonyms should be noted, and classes needed for the solution are part of
the solution space; those needed only for description are in the problem
space.
P a g e 39 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
o Needed services: Must have identifiable operations that can change its
attributes.
o Example evaluation:
8. Notes:
P a g e 40 | 52
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 the class 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 toward full
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:
P a g e 41 | 52
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 elementary data
items if needed.
o For practical purposes, composite data items provide a reasonable list of
attributes.
6. Class vs. Attribute:
o Avoid defining an item as an attribute if multiple instances of the item are
associated with the class.
o Example: Sensors are not attributes of the System class but are defined as 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:
P a g e 42 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
P a g e 43 | 52
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.
P a g e 44 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Identifying Classes
1. Entity Classes: Represent entities derived from the problem statement, e.g.,
FloorPlan, Sensor.
2. Boundary Classes: Interface elements the user interacts with, e.g.,
CameraWindow.
3. Controller Classes: Manage operations from start to finish, e.g., creation or
update of entity objects, complex communication, validation of data.
P a g e 45 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Identifying Responsibilities
Responsibilities are anything a class knows or does, including both attributes and
operations. 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.
P a g e 46 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Review Process
P a g e 47 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
This process ensures the model accurately represents the requirements and guides further
development.
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 instances of
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..*).
P a g e 48 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
A Wall object may contain zero or more Window objects (0..*) and zero or more
Door objects (0..*).
The relationships and multiplicities can be illustrated in UML diagrams, as shown below:
Dependencies
P a g e 49 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
Stereotypes: Dependencies are often defined using stereotypes, which are special
modeling elements with custom-defined semantics. In UML, stereotypes are enclosed in
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:
The Display Window depends on the Camera for video images. Additionally,
access to specific camera views may be controlled by a special password.
In this diagram, <<access>> implies that the use of the camera output by the
DisplayWindow is controlled by a special password.
P a g e 50 | 52
SOFTWARE ENGINEERING & PROJECT MANAGEMENT
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 the user
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.
P a g e 51 | 52
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.
P a g e 52 | 52