Understanding Software Requirements Engineering
Understanding Software Requirements Engineering
UNDERSTANDING REQUIREMENTS
Requirements Engineering:
The broad spectrum of tasks and techniques that lead to an understanding of requirements is called
requirements engineering. From a software process perspective, requirements engineering is a major
software engineering action that begins during the communication activity and continues into the
modelling activity
Requirements engineering builds a bridge to design and construction. Requirements engineering provides
the appropriate mechanism for understanding what the customer wants, analyzing need, assessing
feasibility, negotiating a reasonable solution and managing the requirements as they are transformed into
an operational system
It encompasses seven distinct tasks: inception, elicitation, elaboration, negotiation,specification, validation,
and management.
• Inception: At project inception, you establish a basic understanding of the problem, the people who
want a solution, the nature of the solution that is desired, and the effectiveness of preliminary
communication and collaboration between the other stakeholders and the software team.
• Elicitation: It certainly seems simple enough—ask the customer, the users and what the objectives for
the system or product are, what is to be accomplished, how the system or product fits into theneeds of
the business, and finally, how the system or product is to be used on a day-to-day basis The number of
problems that are encountered as elicitation occurs.
Problems of scope: customers/users specify unnecessary technical detail that may confuse, rather than
clarify, overall system objectives
Problems of understanding.: The customers/users are not completely sure of what is needed, have a
poor understanding of the capabilities and limitations of their computingenvironment, don’t have a full
understanding of the problem domain, have trouble communicating needs to the system engineer
Problems of volatility. The requirements change over time
• Elaboration: The information obtained from the customer during inception and elicitation is
expanded and refined during elaboration. This task focuses on developing a refined requirements
model that identifies various aspects of software function, behaviour, and information. Elaboration is
driven by the creation and refinement of user scenarios that describe how the end user (and other
actors) will interact with the system
The next set of questions enables you to gain a better understanding of the problem andallows the
customer to voice his or her perceptions about a solution:
e. How would you characterize “good” output that would be generated by a successfulsolution?
f. What problem(s) will this solution address?
g. Can you show me (or describe) the business environment in which the solution willbe used?
h. Will special performance issues or constraints affect the way the solution isapproached?
The final set of questions focuses on the effectiveness of the communication activity itself. Which are
called as “meta-questions” and propose the following (abbreviated) list:
Requirements elicitation
Requirements elicitation (also called requirements gathering) combines elements of problem solving,
elaboration, negotiation, and specification. In order to encourage a collaborative, team-oriented approach
to requirements gathering, stakeholders work together to identify the problem, propose elements of the
solution, negotiate different approaches and specify a preliminary set of solution requirements.
The goal is to identify the problem, propose elements of the solution, negotiate different approaches, and
specify a preliminary set of solution requirements in an atmosphere.
I present a brief scenario that outlines the sequence of events that lead up to the requirements gathering
meeting, occur during the meeting
Out of these initial meetings, the developer and customers write a one- or two-page “productrequest.”
A meeting place, time, and date are selected; a facilitator is chosen; and attendees from the software team
and other stakeholder organizations are invited to participate. The product request is distributed to all
attendees before the meeting date.
While reviewing the product request in the days before the meeting, each attendee is asked to make a list
of objects that are part of the environment that surrounds the system, other objects that are to be
produced by the system, and objects that are used by the system to perform its functions. In addition, each
attendee is asked to make another list of services (processes or functions) that manipulate or interact with
the objects. Finally, lists of constraints (e.g., cost, size, business rules) and performance criteria.
Dept. of CS&E, BIT Page 4
SOFTWARE ENGINEERING & PROJECT MANAGEMENT MODULE-2
As an example, consider an excerpt from a product request written by a marketing person involved in the
SafeHome project. This is an home security function that is to be part of SafeHome.
Objects described for SafeHome might include the control panel, smoke detectors, window and door
sensors, motion detectors, an alarm. The list of services might include configuring the system, setting the
alarm, monitoring the sensors, dialing the phone, programming the control panel, and reading the display
The lists of objects have been posted on an electronic bulletin board.
In many cases, an object or service described on a list will require further explanation. To accomplish
this, stakeholders develop mini-specifications for entries on the lists. Each mini- specification is an
elaboration of an object.
The team may raise an issue that cannot be resolved during the meeting. An issues list
is maintained so that these ideas will be acted on later.
Usage Scenarios:
As requirements are gathered, an overall vision of system functions and features begins to materialize.
However, it is difficult to move into more technical software engineering activities until you understand
how these functions and features will be used by different classes of end users. To accomplish this,
developers and users can create a set of scenarios that identify a thread of usage for the system to be
constructed. The scenarios, often called use cases.
In many instances, uses cases are further elaborated to provide considerably more detail about the
interaction. For example, the following template for detailed descriptions of use cases.
Fig. UML use case diagram for SafeHome Home Security Function.
Scenario-based elements: The system is described from the user’s point of view using a scenario-based
approach. For example, basic use cases and their corresponding use-case diagrams (Figure 5.3) evolve
into more elaborate template-based use cases.
Scenario-based elements of the requirements model are often the first part of themodel that is developed.
As such, they serve as input for the creation of other modelling elements.
Class-based elements:
Each usage scenario implies a set of objects that are manipulated as an actor interacts with the system.
These objects are categorized into classes—a collection of things thathave similar attributes and common
behaviors.
Behavioral elements:
Therefore, the requirements model must provide modeling elements that depictbehavior.
The state diagram is one method for representing the behavior of a system by depicting its states and the
events that cause the system to change state. A state is any externally observable mode of behavior. In
addition, the state diagram indicates actions (e.g., process activation) taken as a consequence of a
particular event. To illustrate the use of a state diagram, consider software embedded within the
SafeHome control panel that is responsible for reading user input. A simplified UML state diagram is
shown in Figure 5.5.
Flow-oriented elements:
Information is transformed as it flows through a computer-based system. The system accepts input in a
variety of forms, applies functions to transform it, and produces output in a variety of forms. Input may
be a control signal transmitted by atransducer, a series of numbers typed by a human operator, a packet of
information transmitted on a network link, or a voluminous data file retrieved from secondary storage.
Validating Requirements
As each element of the requirements model is created, it is examined for inconsistency, omissions, and
ambiguity. The requirements represented by the model are prioritized by the stakeholders and grouped
within requirements packages that will be implemented as software increments. A review of the
requirements model addresses the following questions:
• Is each requirement consistent with the overall objectives for the system/product?
• Have all requirements been specified at the proper level of abstraction? That is, do some
requirements provide a level of technical detail that is inappropriate at this stage?
• Is the requirement really necessary or does it represent an add-on feature that may not be essential
to the objective of the system?
• Is each requirement bounded and unambiguous?
• Does each requirement have attribution? That is, is a source (generally, a specific individual)
noted for each requirement?
• Do any requirements conflict with other requirements?
• Is each requirement achievable in the technical environment that will house the system or
product?
• Is each requirement testable, once implemented?
• Does the requirements model properly reflect the information, function, and behavior of the
system to be built?
• Has the requirements model been “partitioned” in a way that exposes progressively more detailed
information about the system?
• Have requirements patterns been used to simplify the requirements model? Have all patterns been
properly validated? Are all patterns consistent with customer requirements? These and other
questions should be asked and answered to ensure that the requirements model is an accurate
reflection of stakeholder needs and that it provides a solid foundation for design
Requirements Analysis
Requirements analysis results in the specification of software’s operational characteristics, indicates
software’s interface with other system elements, and establishes constraints that software must meet.
Requirements analysis allows us to elaborate on basic requirements established during the inception,
elicitation, and negotiation tasks that are part of requirements engineering. The requirements modeling
action results in one or more of the following types of models:
• Scenario-based model so requirements from the point of view of various system “actors”.
• Data models that depict the information domain for the problem.
• Class-oriented models that represent object-oriented classes (attributes and operations) and the
manner in which classes collaborate to achieve system requirements.
• Flow-orientedmodelsthatrepresentthefunctionalelementsofthesystemandhowtheytransformdataasit
moves through the system.
• Behaviouralmodelsthatdepicthowthesoftwarebehavesasaconsequenceofexternal“events”.
• These models provide a software designer with information that can be translated to architectural,
interface, and component-level designs. Finally, the requirements model (and the software
requirements specification) provides the developer and the customer with the means to assess
quality once software is built.
or business functionality as it is achieved by applying software, hardware, data, human, and other system
elements and a software design that describes the software’s application architecture, user interface, and
component-level structure. This relationship is illustrated in Figure 6.1.
Analysis Rules of Thumb
Arlow and Neustadt [Arl02] suggest a number of worthwhile rules of thumb that should be followed
when creating the analysis model:
• The model should focus on requirements that are visible within the problem or business domain. The
level of abstraction should be relatively high. “Don’t get bogged down in details” that try to explain how
the system will work.
• Each element of the requirements model should add to an overall understanding of software
requirements and provide insight into the information domain, function, and behaviour of the system.
• Delay consideration of infrastructure and other nonfunctional models until design. That is, a database
may be required, but the classes necessary to implement it, the functions required to access it, and the
behaviour that will be exhibited as it is used should be considered only after problem domain analysis has
been completed.
• Minimize coupling throughout the system. It is important to represent relationships between classes
and functions. However, if the level of “interconnectedness” is extremely high, effort should be made to
reduce it.
• [Link] for
the model. For example, business stakeholders should use the model to validate requirements; designers
should use the model as a basis for design; QA people should use the model to help plan acceptance tests.
• Keep the model as simple as it can be. Don’t create additional diagrams when they add none win
formation. Don’t use complex notational forms, when a simple list will do.
Domain Analysis
The analysis patterns often reoccur across many applications within a specific business domain. If these
patterns are defined and categorized in a manner that allows you to recognize and apply them to solve
common problems, the creation of the analysis model is expedited. More important, the likelihood of
applying design patterns and executable software components grows dramatically. This improves time- to-
market and reduces development costs.
Figure 6.2 illustrates key inputs and outputs for the domain analysis process. Sources of domain
knowledge are surveyed in an attempt to identify objects that can be reused across the domain.
The goal of domain analysis is straight forward: to find or create those analysis classes and/or analysis
patterns that are broadly applicable so that they may be reused. Domain analysis may be viewed as an
umbrella activity for the software process. By this I mean that domain analysis is an ongoing software
engineering activity that is not connected to any one software project. In a way, the role of a domain
analyst is similar to the role of a master tool smith in a heavy manufacturing environment.
The job of the toolsmith is to design and build tools that may be used by many people doing similar but
not necessarily the same jobs. The role of the domain analyst5 is to discover and define analysis patterns,
analysis classes, and related information that may be used by many people working on similar but not
necessarily the same applications.
Each element of the requirements model (Figure 6.3) presents the problem from a different point of view.
• Scenario-based elements depict how the user interacts with the system and the specific sequence of
activities that occur as the software is used.
• Class-based elements model the objects that the system will manipulate, the operations that will be
applied to the objects to effect the manipulation, relationships (some hierarchical) between the objects,
and the collaborations that occur between the classes that are defined.
• Behavioral elements depict how external events change the state of the system or the classes that
reside within it.
• Flow-oriented elements represent the system as an information transform, depicting how data objects
are transformed as they flow through various system functions. Analysis modelling leads to the
derivation of each of these modelling elements. However, the specific content of each element (i.e.,
the diagrams that are used to construct the element and the model may differ from project to project.
SENARIO-BASEDMODELLING
Creating a Preliminary Use Case:
Ausecasedescribesaspecificusagescenarioinstraightforwardlanguagefromthepointofviewofa defined actor.
But how do you know
(1) What to write about,
(2) How much to write about it,
(3) How detailed to make your description, and
(4) How to organize the description?
These are the questions that must be answered if use cases are to provide value as a requirements
modeling tool.
What to write about?
The first two requirements engineering tasks—inception and elicitation—provide you with the
information you’ll need to begin writing use cases. Requirements gathering meetings, QFD, and other
requirements engineering mechanisms are used to identify stakeholders, define the scope of the problem,
specify overall operational goals, establish priorities, outline all known functional requirements, and
describe the things (objects) that will be manipulated by the system. To begin developing a set of use
cases, list the functions or activities performed by a specific actor.
The Safe Home homesurveillance function (subsystem )discussed in the sidebar identifies the following
functions (an abbreviated list) that are performed by the home owner actor:
Select camera to view.
• Request thumbnails from all cameras.
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.
Other behavior: An alarm condition may arise, leading to a special alarm notification and options relevant
to the alarm. This scenario, applicable to any interaction, becomes a separate use case, "Alarm condition
encountered."
Each situation is a use-case exception, describing a failure condition or an alternative chosen by the actor
that causes the system to behave differently. Cockburn recommends brainstorming to identify a
comprehensive set of exceptions for each use case.
Additional issues to explore include:
• Validation functions that might invoke potential error conditions.
• Supporting functions (or actors) failing to respond appropriately, such as timeouts.
• Poor system performance leading to unexpected user actions, such as multiple selections due to slow
response.
The list of exceptions should be rationalized: an exception is noted if the software can detect and handle
the condition. In some cases, an exception leads to developing another use case to handle the condition.
For example, improper system configuration causing an error or an alarm condition interrupting any
scenario must be addressed. Brainstorming identifies all possible exceptions, ensuring a comprehensive
use case that covers various interactions and system behaviors
FIGURE6.4 Preliminary use-case diagram for the Safe Home system description, a use case is only as
good as its author(s). If the description is unclear, the use case can be misleading or ambiguous. A use
case focuses on functional and behavioral requirements and is generally inappropriate for nonfunctional
requirements.
For situations in which the requirements model must have every modeling notation has limitations, and
the use case is no exception. Like any other form of written significant detail and precision (e.g., safety
critical systems), a use case may not be sufficient. However, scenario-based modeling is appropriate for a
significant majority of all situations that you will encounter as a software engineer. If developed properly,
the use case can provide substantial benefit as a modeling tool.
UMLMODELSTHATSUPLIMENTSTHEUSECASE
Developing an Activity Diagram
The UML activity diagram supplements the use case by providing a graphical representation of the flow
of interaction within a specific scenario. Similar to the flowchart, an activity diagram uses rounded
rectangles to imply a specific system function, arrows to represent flow through the system, decision
diamonds to depict a branching decision (each arrow emanating from the diamond is labeled), and solid
horizontal lines to indicate that parallel activities are occurring.
For example, a user may only attempt to enter userID and password a limited number of times. This is
represented by a decision diamond below “Prompt for reentry.”
Swimlane Diagrams
The UML swimlane diagram is a useful variation of the activity diagram and allows you to represent the
flow of activities described by the use case and at the same time indicate which actor (if there are
multiple actors involved in a specific use case) or analysis class (discussed later in this chapter) has
responsibility for the action described by an activity rectangle. Responsibilities are represented as parallel
segments that divide the diagram vertically, like the lanes in a swimming pool.
Referring to Figure 6.6, the activity diagram is rearranged so that activities associated with a particular
analysis class fall inside the swimlane for that class. For example, the Interface class represents the user
interface as seen by the homeowner. The activity diagram notes two prompts that are the responsibility of
the interface—“prompt for reentry” and “prompt for another view.” These prompts and the decisions
associated with them fall within the Interface swimlane. However, arrows lead from that swim lane back
to the Home owner swimlane, where homeowner actions occur.
DATAMODELLINGCONCEPTS
If software requirements include the need to create, extend, or interface with a database or if complex
data structures must be constructed and manipulated, the software team may choose to create a data
model as part of overall requirements modelling. A software engineer or analyst defines all data objects
that are processed within the system, the relationships between the data objects, and other information
that is pertinent to the relationships. The entity-relationship diagram (ERD) addresses these issues and
represents all data objects that are entered, stored, transformed, and produced within an application.
DATAOBJECTS
A data object is a representation of composite information that must be understood by software. By
composite information, I mean something that has a number of different properties or attributes.
Therefore, width (a single value) would not be a valid data object, but dimensions (incorporating height,
width, and depth) could be defined as an object. A data object can be an external entity (e.g., anything
that produces or consumes information), a thing (e.g., a report or a display), an occurrence (e.g., a
telephone call) or event (e.g., an alarm), a role (e.g., salesperson), an organizational unit (e.g., accounting
department), a place (e.g., a warehouse), or a structure (e.g., a file). For example, a person or a car can be
viewed as a data object in the sense that either can be defined in terms of a set of attributes. The
description of the data object incorporates the data object and all of its attributes. A data object
encapsulates data only—there is no reference within a data object to operations that act on the data.10
Therefore, the data object can be represented as a table as shown in Figure 6.7. The headings in the table
reflect attributes of the object. In this case, a car is defined in terms of make, model, ID number, body
type, colour, and owner. The body of the table represents specific instances of the data object. For
example, a Chevy Corvette is an instance of the data object car.
DATA ATTRIBUTES
Data attributes define the properties of a data object and take on one of three different characteristics.
They can be used to
(1) name an instance of the data object,
(2) describe the instance, or
(3) make reference to another instance in another table. In addition, one or more of the attributes must be
defined as an identifier— that is the identifier attribute becomes a “key” when we want to find an
instance of the data object.
In some cases, values for the identifier(s) are unique, although this is not a requirement. Referring to the
data object car, a reasonable identifier might be the ID number. The set of attributes that is appropriate
RELATIONSHIPS
Data objects are connected to one another in different ways. Consider the two data objects, person and
car. These objects can be represented using the simple notation, illustrated in Figure 6.8a. A connection is
established between person and car because the two objects are related. But what are the relationships?
To determine the answer, you should understand the role of people(owners, in this case) and cars within
the context of the software to be built. You can establish a set of object/ relationship pairs that define the
relevant relationships.
For example,
• A person owns a car.
• A person is insured to drive a car.
The relationships own and insured to drive define the relevant connections between person and car. Figure 6.8b
illustrates these object-relationship pairs graphically. The arrows noted in Figure 6.8b provide important
information about the directionality of the relationship and often reduce ambiguity or misinterpretations.
The list would be continued until all nouns in the processing narrative have been considered. Note that I
call each entry in the list a potential object. You must consider each further before a final decision is
made. 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
SOFTWARE ENGINEERING & PROJECT MANAGEMNET MODULE-2
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.
To be considered a legitimate class for inclusion in the requirements model, a potential object should
satisfy all (or almost all) of these characteristics. The decision for inclusion of potential classes in the
analysis model is somewhat subjective, and later evaluation may cause an object to be discarded or
reinstated. However, the first step of class-based modelling is the definition of classes, and decisions
(even subjective ones) must be made. With this in mind, you should apply the selection characteristics to
the list of potential SafeHome classes:
:
• Attributes describe a class that has been selected for inclusion in the requirements model.
• Attributes are the set of data objects that fully define the class within the context of the problem.
• To develop a meaningful set of attributes for an analysis class, you should study each use case and
select those “things” that reasonably “belong” to the class. In addition, the following question should be
answered for each class: “What data items (composite and/or elementary) fully define this class in the
context of the problem at hand?”
• To illustrate, we consider the System class defined for SafeHome. A homeowner can configure the
security function to reflect sensor information, alarm response information, activation/deactivation
information, identification information, and so forth. We can represent these composite data items in the
following manner
• data items to the right of the equal sign constitute a reasonable list of attributes for the System class.
• Sensor has already been defined as a class, and multiple Sensor objects will be associated with the
System class. In general, we avoid defining an item as an attribute if more than one of the items is to be
associated with the class.
Defining Operations
Operations define the behavior of an object.
• Operations can generally be divided into four broad categories:
1. Operations that manipulate data in some way. Eg: adding, deleting, reformatting, selecting
2. operations that perform a computation
3. operations that inquire about the state of an object
4. Operations that monitor an object for the occurrence of a controlling event.
SOFTWARE ENGINEERING & PROJECT MANAGEMNET MODULE-2
Classes:
The taxonomy of class types can be extended by considering the following categories:
1. Entity classes (also called model or business classes): are extracted directly from the statement of the problem.
These classes typically represent things that are to be stored in a database and persist throughout the duration of the
application (unless they are specifically deleted).
2. Boundary classes: are used to create the interface that the user sees and interacts with as the software is used
(e.g., interactive screen or printed reports). Boundary classes are designed with the responsibility of managing the
way entity objects are represented to users. Entity objects contain information that is important to users, but they do
not display themselves.
3. Controller classes: manage a “unit of work” from start to finish. Controller classes are not considered until the
design activity has begun. 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.
Responsibilities:
Five guidelines for allocating responsibilities to classes:
1. System intelligence should be distributed across classes to best address the needs of the problem:
• Every application encompasses a certain degree of intelligence; that is, what the system knows and what
it can do.
• “Dumb” classes (those that have few responsibilities) can be modeled to act as servants to a few “smart”
classes (those having many responsibilities)
• Although this approach makes the flow of control in a system straightforward, it has a few disadvantages:
it concentrates all intelligence within a few classes, making changes more difficult, and it tends to require
more classes, hence more development effort.
• If system intelligence is more evenly distributed across the classes in an application, each object knows
about and does only a few things, the cohesiveness of the system is improved. This enhances the
maintainability of the software and reduces the impact of side effects due to change.
• 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. In addition, the responsibilities for each
class should exhibit the same level of abstraction.
2. Each responsibility should be stated as generally as possible. This guideline implies that general
responsibilities (both attributes and operations) should reside high in the class hierarchy (because they are
generic, they will apply to all subclasses).
3. Information and the behavior related to it should reside within the same class. This achieves the object-
Collaborations:
• Classes fulfill their responsibilities in one of two ways:
1. A class can use its own operations to manipulate its own attributes, thereby fulfilling a particular
responsibility
2. a class can collaborate with other classes.
• Collaborations represent requests from a client to a server in fulfillment of a client responsibility. A
collaboration is the embodiment of the contract between the client and the server. We say that an object
collaborates with another object if, to fulfill a responsibility, it needs to send the other object any
messages. A single collaboration flows in one direction—representing a request from the client to the
server. From the client’s point of view, each of its collaborations is associated with a particular
responsibility implemented by the server.
• 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 To help in the identification of
collaborators, you can examine three different generic relationships between classes.
1. The is-part-of relationship all classes that are part of an aggregate class are connected to the aggregate
class via an is-part-of relationship. Consider the classes defined for the video game, the class PlayerBody is-
part-of Player, as are Player Arms, Player Legs, and Player Head. In UML, these relationships are
• In many instances, a client-server relationship exists between two analysis classes. In such cases, a client class
depends on the server class in some way and a dependency relationship is established.
• Dependencies are defined by a stereotype.
• A stereotype is an “extensibility mechanism” within UML that allows you to define a special modeling element
whose semantics are custom defined.
• In UML stereotypes are represented in double angle brackets (e.g., <>).
In Figure 6.14 <> implies that the use of the camera output is controlled by a special password
Analysis Packages
• A package is used to assemble a collection of related classes.
• An important part of analysis modeling is categorization
• That is, various elements of the analysis model (e.g., use cases, analysis classes) are categorized
in a manner that packages them as a grouping—called an analysis package—that is given a
representative name.
• The plus sign preceding the analysis class name in each package indicates that the classes have public
visibility and are therefore accessible from other packages.
The data flow diagram (DFD) and related diagrams and information are not a formal part of UML, they can be
used to complement UML diagrams and provide additional insight into system requirements and flow.
The DFD takes an input-process-output view of a system. That is, data objects flow into the software, are
transformed by processing elements, and resultant data objects flow out of the software. Data objects are
represented by labeled arrows, and transformations are represented by circles (also called bubbles). The DFD is
presented in a hierarchical fashion. That is, the first data flow model (sometimes called a level 0 DFD or context
diagram) represents the system as a whole
A few simple guidelines can aid immeasurably during the derivation of a data flow
diagram:
(1) The level 0 data flow diagram should depict the software/system as a single
bubble.
(3) Refinement should begin by isolating candidate processes, data objects, and
(4) All arrows and bubbles should be labeled with meaningful names;
(6) one bubble at a time should be refined. There is a natural tendency to overcomplicate the data flow diagram.
A large class of applications are “driven” by events rather than data, produce control information rather
than reports or displays, and process information with heavy concern for time and performance.
Such applications require the use of control flow modeling in addition to data flow modeling
• Recalling the noun/verb parse that was applied to the processing narrative,
• Describe the behavior of a system by identifying its states, identify how each
example, ask: “Is there any other way I can get to this state or exit from it?”
A control specification (CSPEC) represents the behavior of the system (at the level from which it has been
referenced) in two different ways.
The CSPEC contains a state diagram that is a sequential specification of behavior. It can also contain a
program activation table—a combinatorial specification of behavior.
Figure 7.4 depicts a preliminary state diagram for the level 1 control flow model for Safe Home. The
diagram indicates how the system responds to events as it traverses the four states defined at this level. By
reviewing the state diagram, you can determine the behavior of the system and, more important, ascertain
whether thereare “holes” in the specified behavior.
The process specification (PSPEC) is used to describe all flow model processes that appear at the final level of
refinement. The content of the process specification can include narrative text, a program design language (PDL)
description of the process algorithm, mathematical equations, tables, or UML activity diagrams.
1. Evaluate all use cases to fully understand the sequence of interaction within
the system.
2. Identify events that drive the interaction sequence and understand how these
An actor should be identified for each event; the information that is exchanged should be noted, and any
conditions or constraints should be listed.
State Representations
One component of a behavioral model is a UML state diagram that represents active states for each class and the
events (triggers) that cause changes between these active states.
An action occurs concurrently with the state transition or as a consequence of it and generally involves one or more
operations (responsibilities) of the object.
(1) The state of each class as the system performs its function
(2) The state of the system as observed from the outside as the system performs its function
Sequence diagrams
Sequence diagrams. The second type of behavioral representation, called a sequence diagram in UML,
indicates how events cause transitions from object to object.
Once events have been identified by examining a use case, the modeler creates a sequence diagram—a
representation of how events cause flow from one object to another as a function of time.
In essence, the sequence diagram is a shorthand version of the use case. It represents key classes and the
events that cause behavior to flow from class to class.