Module 2 SE
Module 2 SE
Understanding Requirements
Requirement Engineering
• The process to gather the software requirements from client, analyze and
• It must be adapted to the needs of the process, the project, the product, and
• It begins at the feet of the project stakeholders (e.g., managers, customers, end
users), where business need is defined, user scenarios are described, functions
• Inception(Better understanding)
• Elicitation(Clear understanding)
• Validation(Validates requirements)
• This initial information might change, but it's enough to start discussions with the software team.
• Assess the effectiveness of communication and collaboration between stakeholders and the
Requirement Engineering
2. Elicitation
It's the process of gathering detailed requirements for the system or product from customers and
users.
• Scope Problems: The system boundaries might be unclear, or users might give too much
technical detail that confuses the main goals.
• Understanding Problems: Users might:
• Volatility Problems: Requirements can change over time. Which will lead to loss and
wastage of resources and time.
Requirement Engineering
2. Elicitation
3. Elaboration:
• This phase builds upon the initial information gathered from customers, refining it further
to create a detailed requirements model.
• The information obtained from the customer during inception and elicitation is expanded
and refined during elaboration.
• As an end result this model outlines the specific functions, behaviors, and data aspects of
the software.
Requirement Engineering
4. Negotiation:
• When customers or users request more than what's feasible given limited resources, or
when conflicting requirements arise, negotiation comes into play.
5. Specification:
• This step evaluates the quality of requirements work products to ensure clarity,
consistency, and adherence to standards.
• Validation ensures that all software requirements are unambiguous, errors are corrected,
and work products meet established standards.
Requirement Engineering
7. Requirements Management:
• Requirements for computer-based systems evolve over time, demanding a systematic
approach to identify, control, and track changes.
• Stakeholders and software engineers work together on the same team. In such cases,
requirements engineering is simply a matter of conducting meaningful conversations with
colleagues who are well-known members of the team.
• The usual stakeholders are business operations managers, product managers, marketing
people, internal and external customers, end users, consultants, product engineers
Establishing the groundwork / Initiating the Requirement engineering
Context-Free Questions:
• How would you characterize “good” output from a successful solution?(Does the output
achieve the intended purpose?)
• What problem(s) will this solution address?
• Can you describe the business environment where the solution will be used?
Establishing the groundwork / Initiating the Requirement engineering
• Asking the First Questions
Communication Effectiveness:
• Are you the right person to answer these questions? Are your answers “official”?
• Usage Scenarios
Structure:
• Preparation and participation rules are established.
• Use of a definition mechanism (e.g., worksheets, wall stickers, charts) to record ideas.
• The mini-spec for the SafeHome object Control Panel might be:
Types of Requirements:
• Normal Requirements: When creating a product or system, there are specific objectives
and goals that are agreed upon during discussions with the customer. If the product or
system includes these requested features and functions as expected, the customer is
satisfied. Examples of normal requirements might be requested types of graphical displays,
specific system functions, and defined levels of performance.
Eliciting Requirements
• Quality Function Deployment (QFD)
Types of Requirements:
• Expected Requirements: Fundamental but implicit needs (e.g., ease of use,
reliability).Expected requirements are the basic features or qualities that a product or
system must have, even if the customer doesn't specifically mention them.
These requirements are so essential. Examples of expected requirements are: ease of
human/machine interaction, overall operational correctness and reliability, and ease of
software installation.
• Exciting Requirements: Unexpected features that delight users (e.g., multitouch screen,
visual voicemail). These features exceed customer expectations and significantly
Eliciting Requirements
• Quality Function Deployment (QFD)
• These data are then translated into a table of requirements—called the customer
voice table—that is reviewed with the customer and other stakeholders.
Purpose: Create scenarios to understand how different user classes will interact with the
system, providing a clear vision of system functions and features.
Use case describes how a system can be used to achieve specific goals or tasks.
Eliciting Requirements
• Elicitation Work Products
The work products created during requirements elicitation vary by system size but
Typical Outputs:
• A statement of need and feasibility.
• A bounded statement of scope for the system or product.
• A list of customers, users, and other stakeholders who participated in requirements elicitation.
• A description of the system’s technical environment.
• A list of requirements (preferably organized by function) and the domain constraints that apply to each.
• A set of usage scenarios that provide insight into the use of the system or product under different operating
conditions.
• Any prototypes developed to better define requirements.
Developing Use Cases
• A use case presents a structured narrative detailing how an end user, assuming one of
several possible roles, engages with the system within a defined scenario.
• This narrative can take various forms, such as written text, task outlines, templates, or
diagrams, but always offers a picture of the software or system from the perspective of the
end user.
Developing Use Cases
Steps to demonstrate Actors and use cases interact within a system, highlighting roles,
goals, tasks, and the basic flow of interactions.
•Use Cases and Actors: Use cases depict interactions between users/devices and a system,
•Defining Actors: Identifying the actors involved in a use case is the initial step, representing
•Actor's Role: Actors symbolize the roles individuals or devices play within the system, each
•Primary and Secondary Actors: Primary actors interact directly with the system to fulfill
its functions, while secondary actors support primary actors in achieving their tasks.
•Developing Use Cases: After identifying actors, use cases are formulated, addressing
•Basic Use Case: It offers a top-level representation of an actor's interaction with the system,
•It changes dynamically as more information is learned about the system and
stakeholders refine their requirements.
•As the requirements model evolves, certain elements will become stable, providing
•Other elements may remain volatile, indicating that stakeholders have not yet fully
b) Analysis Patterns
Building The Requirements Model
• There are many ways to look at the requirements for a computer-based system.
1. Scenario-based elements.
a. Basic Use Cases: These are the initial, simple descriptions of user
interactions with the system.
b. Use-Case Diagrams: These diagrams visually represent the
interactions between users (actors) and the system.
c. Template-Based Use Cases: These are more detailed and structured
descriptions of use cases, often following a standardized format.
Building The Requirements Model
a) Elements of the Requirements Model:
1. Scenario-based elements.
UML activity diagram for
eliciting requirements
Building The Requirements Model
3. Behavioral elements:
3. Behavioral elements:
State diagram:
• A state diagram represents system behavior by showing its states and the events
causing state changes.
• A state is any externally observable mode of behavior.
• The state diagram also indicates actions taken as a result of particular events (e.g.,
process activation).
Building The Requirements Model
a) Elements of the Requirements Model:
4. Flow-oriented elements
b) Analysis Patterns:
•Recurring Problems: Requirements engineers often notice that certain problems recur
behavior.
•Reusability: Analysis patterns can be reused across multiple applications within the
same domain.
Negotiating Requirements
Negotiating Requirements
Negotiating Requirements
Negotiating Requirements
Barry Boehm, an expert in software engineering, defines the activities at the
beginning of each software process iteration.
2.Determine Win Conditions: Identify the "win conditions" for each stakeholder.
3.Reconcile(settle) Win Conditions: Negotiate to settle these win conditions into a set of
•Necessity: Is the requirement essential or is it an add-on feature that may not be critical?
•Model Accuracy: Does the model accurately reflect the system's information, function, and
behavior?
•Partitioning: Has the model been partitioned to expose progressively more detailed
information?
•Patterns: Have requirements patterns been used and validated? Are they consistent with
customer requirements?
Summary
Specification documents the requirements clearly, and validation ensures they meet
customer needs.
• Overall, these activities ensure that the right system is built according to stakeholder
a. Requirements Analysis
Who does it? A software engineer or analyst builds the model using customer
requirements.
How do I ensure it's done right? Requirements models must be reviewed for
correctness, completeness, and consistency, reflecting all stakeholders' needs and
providing a solid foundation for design.
a. Requirements Analysis
• Requirements Analysis specifies software's operational characteristics,
interfaces, and constraints.
Class Diagram
a. Requirements Analysis
i) Overall Objectives and Philosophy:
• The analysis model bridges the gap between a system-level description that
software, hardware, data, human, and other system elements and a software
design
a. Requirements Analysis
Fig: The requirements model as a bridge between the system description and the design model
a. Requirements Analysis
ii)Analysis Rules of Thumb
Arlow and Neustadt suggest several key guidelines for creating an analysis model:
• Keep it simple: Don’t create additional diagrams when they add no new
information. Don’t use complex notational forms, when a simple list will do.
a. Requirements Analysis
iii)Domain Analysis:
• Analysis patterns often reappear in many applications within a specific business domain.
• By defining and categorizing these patterns, you can easily recognize and use them to solve
common problems, which speeds up development of analysis model and lowers costs.
• But how are analysis patterns and classes recognized in the first place? Who defines them,
categorizes them, and readies them for use on subsequent projects? The answers to these
questions lie in domain analysis.
• The diagram shows that domain analysis uses sources like technical
literature, existing applications, customer surveys, expert advice, and
current/future requirements to produce a domain analysis model.
• The goal is to find common elements that can apply to all applications in that
area.
a)Structured analysis:
• It sees data and processes that transform data as separate entities.
• Processes are depicted with data flows, illustrating actions or operations performed by
the system.
• Utilizes tools like Data Flow Diagrams (DFDs) and Entity-Relationship Diagrams
(ERDs)
a. Requirements Analysis
iv) Requirements Modeling Approaches:
b) Object-oriented analysis
• It focuses on defining classes and how they collaborate, often using tools like
UML(Unified Modeling Language) and the Unified Process.
Each element of the requirements model presents the problem from a different
point of view.
3. Behavioral elements depict how external events change the state of the
system or the classes that reside within it.
a. Requirements Analysis
iv) Requirements Modeling Approaches:
Analysis modeling helps derive these elements, though their content can vary
depending on the project.
a. Requirements Analysis
iv) Requirements Modeling Approaches:
Additional considerations:
• Arrows: Arrows show the flow of control or data from one activity to the next,
• Horizontal Lines (Bars): Solid horizontal lines indicate the start or end of
flow of activities in a use case while indicating which actor or analysis class is
resembling swimming lanes. This makes it clear who is responsible for each
• Data objects
• Data attributes
• Relationships
• Additional information
d. Data modeling concepts
• Data objects: A data object represents composite information that software must
understand. For example, "dimensions" (height, width, depth) is a valid data object,
unlike a single value like "width."
• Structure: File.
d. Data modeling concepts
• Data objects: A data object encapsulates data only—there is no reference within a data object
to operations that act on the data. Therefore, the data object can be represented as a table.
d. Data modeling concepts
ii) Data Attributes
• One or more attributes serve as an identifier or "key" to find instances of the data
object. Identifier values can be unique but it's not mandatory.
d. Data modeling concepts
iii) Relationships
Data objects are connected in various ways. For example, the objects "person" and
"car" are related. To determine their relationships, understand the roles within
the software context.
Some possible relationships are:
•A person owns a car.
•A person is insured to drive a car.
These object/relationship pairs define how the data objects are connected.
e. Class-based modeling
Class-based modeling represents the objects that the system will manipulate,
the operations that will be applied to the objects to effect the manipulation,
relationships between the objects, and the collaborations that occur between
the classes that are defined.
• If a class is essential for making the solution work, it's in the 'solution space’.
• If it just talks about the solution but doesn't make it happen, it's in the
'problem space’.
e. Class-based modeling
i)Identifying Analysis Classes - Analysis classes can be categorized or understood according to
certain types or patterns.
• External entities (e.g., other systems, devices, people) that produce or consume information to
be used by a computer-based system.
• Things (e.g., reports, displays, letters, signals) that are part of the information domain for the
problem.
• Occurrences or events (e.g., a property transfer or the completion of a series of robot
movements) that occur within the context of system operation.
• Roles (e.g., manager, engineer, salesperson) played by people who interact with the system.
• Organizational units (e.g., division, group, team) that are relevant to an application.
• Places (e.g., manufacturing floor or loading dock) that establish the context of the problem and
the overall function of the system.
• Structures (e.g., sensors, four-wheeled vehicles, or computers) that define a class of objects or
related classes of objects.
e. Class-based modeling
i)Identifying Analysis Classes
The SafeHome security function enables the homeowner to configure the security
system when it is installed, monitors all sensors connected to the security system,
and interacts with the homeowner through the Internet, a PC, or a control panel.
During installation, the SafeHome PC is used to program and configure the system.
Each sensor is assigned a number and type, a master password is programmed for
arming and disarming the system, and telephone number(s) are input for dialing
when a sensor event occurs.
When a sensor event is recognized, the software invokes an audible alarm attached to
the system. After a delay time that is specified by the homeowner during system
configuration activities, the software dials a telephone number of a monitoring
service, provides information about the location, reporting the nature of the event that
has been detected.
The telephone number will be redialed every 20 seconds until telephone connection is
obtained.
The homeowner receives security information via a control panel, the PC, or a browser,
collectively called an interface. The interface displays prompting messages and system
status information on the control panel, the PC ,or the browser window. Homeowner
interaction takes the following form . . .
e. Class-based modeling
i)Identifying Analysis Classes
Extracting the nouns,
we can propose a
number of potential
classes:
e. Class-based modeling
i)Identifying Analysis Classes
Coad and Yourdon [Coa91] suggest six selection characteristics that should be used
as you consider each potential class for inclusion in the analysis model:
1. Retained information. The potential class will be useful during analysis only if
information about it must be remembered so that the system can function.
2. Needed services. The potential class must have a set of identifiable operations
that can change the value of its attributes in some way.
3. Multiple attributes. During requirement analysis, the focus should be on “major”
information; a class with a single attribute may, in fact, be useful during design, but
is probably better represented as an attribute of another class during the analysis
activity.
4. Common attributes. A set of attributes can be defined for the potential class and
these attributes apply to all instances of the class.
5. Common operations. A set of operations can be defined for the potential class and
these operations apply to all instances of the class.
6. Essential requirements. External entities that appear in the problem space and
produce or consume information essential to the operation of any solution for the
system will almost always be defined as classes in the requirements model.
e. Class-based modeling
i) Identifying Analysis Classes
e. Class-based modeling
i)Identifying Analysis Classes
It should be noted that:
(1) the preceding list is not all-inclusive, additional classes would have to be added to
complete the model
(2) some of the rejected potential classes will become attributes for those classes that
were accepted (e.g., number and type are attributes of Sensor, and master password and
telephone number may become attributes of System)
(3) different statements of the problem might cause different “accept or reject” decisions
to be made (e.g., if each homeowner had an individual password or was identified by
voice print, the Homeowner class would satisfy characteristics 1 and 2 and would have
been accepted).
e. Class-based modeling
ii) Specifying Attributes
• Attributes are the data objects that define a class within the problem context.
They describe a class included in the requirements model, clarifying what the
• To identify meaningful attributes for an analysis class, study each use case
identifying and organizing the classes that are relevant to system requirements.
• A CRC model uses index cards to represent classes, divided into three sections.
identifying and organizing the classes that are relevant to system requirements.
• A CRC model uses index cards to represent classes, divided into three sections.
• In reality, the CRC model may make use of actual or virtual index cards. The intent is to
develop an organized representation of classes.
• Responsibilities are the attributes and operations that are relevant for the class. Stated simply,
a responsibility is “anything the class knows or does”.
• Collaborators are those classes that are required to provide a class with the information
needed to complete a responsibility.
• In general, a collaboration implies either a request for information or a request for some
action.
e. Class-based modeling
iv) Class-Responsibility-Collaborator (CRC) Modeling
Classes: The taxonomy of class types presented earlier can be extended by considering the following categories:
• Entity classes, also called model or business classes, are extracted directly from the statement of the problem
(e.g., FloorPlan and Sensor). These classes typically represent things that are to be stored in a database and
persist throughout the duration of the application.
• Boundary classes are used to create the interface (e.g., interactive screen or printed reports) that the user sees and
interacts with as the software is used. Entity objects contain information that is important to users, but they do
not display themselves. Boundary classes are designed with the responsibility of managing the way entity objects
are represented to users. For example, a boundary class called CameraWindow would have the responsibility of
displaying surveillance camera output for the SafeHome system.
• Controller classes manage a “unit of work” from start to finish. That is, controller classes can be designed to
manage (1) the creation or update of entity objects, (2) the instantiation of boundary objects as they obtain
information from entity objects, (3) complex communication between sets of objects, (4) validation of data
communicated between objects or between the user and the application. In general, controller classes are not
considered until the design activity has begun.
e. Class-based modeling
iv) Class-Responsibility-Collaborator (CRC) Modeling
Responsibilities:
Distribute System Intelligence: Spread functionality across multiple classes to improve
maintainability and minimize unintended consequences.
• “Dumb” classes (those that have few responsibilities) can be modeled to act as servants
to a few “smart” classes (those having many responsibilities).
• System intelligence is more evenly distributed across the classes
To determine whether system intelligence is properly distributed, the responsibilities noted
on each CRC model index card should be evaluated to determine if any class has an
extraordinarily long list of responsibilities. This indicates a concentration of intelligence.
e. Class-based modeling
iv) Class-Responsibility-Collaborator (CRC) Modeling
Responsibilities:
General Responsibilities: Assign broad tasks to higher-level classes in the hierarchy.
because they are generic they will apply to all subclasses
•Encapsulation: Keep data and its related behaviors within the same class.
•Localized Information: Handle specific information within a single class to avoid
spreading it across multiple classes.
•Shared Responsibilities: Share behaviors among related classes when needed to maintain
consistency.
e. Class-based modeling
iv) Class-Responsibility-Collaborator (CRC) Modeling
Collaboration Types:
1.Is-part-of: This relationship indicates that a class is a component or piece of a larger, whole
class.
2. Has-knowledge-of: This type of collaboration occurs when one class needs to obtain
information from another class to fulfill its responsibilities.
3. Depends-upon: This relationship implies a dependency between two classes that isn't
necessarily about direct knowledge or being a part of a whole. Instead, it’s about an indirect
dependency.(foreign key )
e. Class-based modeling
iv) Class-Responsibility-Collaborator (CRC) Modeling
Collaboration: Collaborations are identified by determining whether a class can fulfill each
responsibility itself. If it cannot, then it needs to interact with another class. Hence, a
collaboration.
Collaboration Types:
Two analysis classes are connected, similar to how two data objects are linked.
In UML, these connections are called associations.
For example:
- "One or more" connections are represented as 1..*.
- "Zero or more" connections are represented as 0..*.
In UML, the asterisk (*) means there's no limit on the number of connections.
Dependency refers to a relationship between two classes where a change in one class may
affect the other class.
e. Class-based modeling
• V. Associations and Dependencies
e. Class-based modeling
In analysis modeling, elements are grouped into categories called analysis packages.
These packages are given representative names and help organize the model.
For example, in video game classes like Tree, Landscape, Road, and others may belong to
one category. Another category might focus on detailing their physical features, actions,
and limitations.
e. Class-based modeling
• VI. Analysis Packages:
Analysis Packages:
For video game
e. Class-based modeling
VI. Analysis Packages:
These classes are organized into packages.
• The plus symbol (+) preceding an element within a package indicates that the
element has public visibility.
• A minus sign (-) signifies that the element is hidden from all other
packages.
• A pound symbol (#) indicates that the element is accessible only to packages
contained within a specific package
Module 2
• Structured Analysis – data and the processes that transform the data are treated as
separate entities. Data objects are modeled in a way that defines their attributes
and relationships. Processes that manipulate data objects are modeled in a manner
that shows how they transform data as data objects flow through the system.
• The first data flow model (sometimes called a level 0 DFD or context diagram)
represents the system as a whole.
• Subsequent data flow diagrams refine the context diagram, providing increasing detail
with each subsequent level.
Flow Oriented Modeling - Creating a Data Flow
Model
• The DFD enables to develop models of information
domain & functional domain.
The primary external entities (boxes) produce information for use by the system and
consume information generated by the system. The labeled arrows represent data objects or
data object hierarchies. For example, user commands and data encompasses all
configuration commands, all activation/deactivation commands, all miscellaneous
interactions, and all data that are entered to qualify or expand a command.
Flow Oriented Modeling - Creating a Data Flow
Model
By performing a grammatical parse on the processing narrative for a
bubble at any DFD level, you can generate much useful information
about how to proceed with the refinement to the next level.
• The process password transform performs password validation at the control panel for
the SafeHome security function. Process password receives a four-digit password from
the interact with user function.
• The password is first compared to the master password stored within the system. If the
master password matches, <valid id message = true> is passed to the message and
status display function.
• If the master password does not match, the four digits are compared to a table of
secondary passwords (these may be assigned to house guests and/or workers who
Requirement Modeling Strategies
Creating a Behavioral Model
The modeling notation upto now represents static elements of the
requirements model. Behavioral Model dynamic behavior of the
system/product, as a function of specific events & time. It indicates how
software will respond to external events or stimuli.
2. Identify events that drive the interaction sequence & understand how
these events relate to specific objects.
• An event is not the information that has been exchanged, but rather the
fact that information has been exchanged.
Ex: Use case for a portion of the SafeHome security function: The
homeowner uses the keypad to key in a four-digit password. The
password is compared with the valid password stored in the system.
Creating a Behavioral Model - Identifying Events with the Use Case
The underlined portions indicate events. An actor should be identified for
each event; the information exchanged should be noted, and any
conditions or constraints should be listed.
• Once all events have been identified, they are allocated to the objects
involved. Objects can be responsible for generating events (e.g.,
Creating a Behavioral Model - State Representations
• In behavioral modeling, two different characterizations of states must be
considered:
(1) the state of each class as the system performs its function and
(2) the state of the system as observed from the outside as the system
performs its function
• The state of a class takes on both passive and active characteristics.
• A passive state is simply the current status of all of an object’s attributes.
Ex- the passive state of the class Player (video game application) would
include the current position and orientation attributes of Player as well as
other features of Player relevant to the game.
• The active state of an object indicates the current status of the object as
it undergoes a continuing transformation or processing. The class Player
might have the following active states: moving, at rest, injured, being
cured; trapped, lost, and so forth.
Creating a Behavioral Model - State Representations
Two different behavioral representations:
A guard is a Boolean condition that must be satisfied in order for the transition to occur. Ex
- the guard for the transition from the “reading” state to the “comparing” state in Figure 7.6
can be determined by examining the use case:
In general, the guard for a transition usually depends upon the value of one or more
attributes of an object. In other words, the guard depends on the passive state of the
object.