0% found this document useful (0 votes)
59 views40 pages

Chapter 6

The document discusses requirements modeling which uses text and diagrams to depict software requirements in an understandable way. There are three perspectives covered: scenario-based models using use cases, data models depicting information domains, and class-based models representing object-oriented classes and collaborations. Requirements analysis elaborates on requirements to specify operational characteristics and interfaces. The modeling results in scenarios, data, classes, flows, and behaviors. Analysis focuses on what the system does at a high level without implementation details.

Uploaded by

The BigBrad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views40 pages

Chapter 6

The document discusses requirements modeling which uses text and diagrams to depict software requirements in an understandable way. There are three perspectives covered: scenario-based models using use cases, data models depicting information domains, and class-based models representing object-oriented classes and collaborations. Requirements analysis elaborates on requirements to specify operational characteristics and interfaces. The modeling results in scenarios, data, classes, flows, and behaviors. Analysis focuses on what the system does at a high level without implementation details.

Uploaded by

The BigBrad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Requirements Modeling:

Scenarios, Information, and


Analysis Classes

Chapter 6
• What is Requirements modeling?
Requirements modeling uses a combination of text
and diagrammatic forms to depict requirements in a way that
is relatively easy to understand.

• Why is it important?
To validate software requirements, you need to
examine them from a number of different points of view.
In this presentation we’ll consider requirements
modeling from three different perspectives: scenario based
models, data(information) models, and class-based models.

Each represents requirements in a different “dimension,”


thereby increasing the probability that errors will be found,
that inconsistency will surface, and that omissions will be
uncovered.
Requirement Analysis
• Requirements analysis:
– Specification of software’s operational characteristics.
– indicates software's interface with other system
elements.
– establishes constraints that software must meet. 
• Requirements analysis allows the software
engineer (called an analyst or modeler) to:
– elaborate on basic requirements established during
earlier requirement engineering tasks. (inception,
elicitation and negotiation)
• The requirements modeling action results in one or more of the
following types of models:

• Scenario-based models of 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-oriented models that represent the functional elements of
the system and how they transform data as it moves through the
system.
• Behavioral models that depict how the software behaves as a
consequence of external “events.
Overall Objectives and Philosophy
requirements modeling, your primary focus is on what, not
how.
 What user interaction occurs in a particular circumstance,
what objects does the system manipulate,
what functions must the system perform,
what behaviors does the system exhibit, what interfaces are
defined, and what constraints apply.

 The requirements model must achieve three primary


objectives:
(1) to describe what the customer requires,
(2) to establish a basis for the creation of a software design, and
(3) to define a set of requirements that can be validated once the
software is built.
A Bridge
Analysis Rules of Thumb
• 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 behavior of the system.
• Delay consideration of infrastructure and other non functional
models until design.
• Minimize coupling throughout the system.
• Be certain that the requirements model provides value to all
stakeholders. Each constituency has its own use for the model.
• Keep the model as simple as it can be. Don't create additional
diagrams when they add no new information. Don’t use complex
notational forms, when a simple list will do.
Domain Analysis

• As part of Requirement Analysis, this is done


for software reuse:
 Can I use these designs for similar
applications in the same domain?
 Define the domain to be investigated.
 Collect a representative sample of
applications in the domain.
Analyze each application in the sample.
 Develop an analysis model for the objects.
• 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.
• (The goal of domain analysis is straightforward: to find or
create those analysis classes and/or analysis patterns that
are broadly applicable so that they may be reused.)
• This improves time-to-market and reduces
development costs.– Domain analysis.
• 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.

• Finally, flow-oriented elements represent the system as an


information transform, depicting how data objects are
transformed as they flow through various system functions.
Scenario Based model
• Although the success of a computer-based system or
product is measured in many ways, user satisfaction
resides at the top of the list.
• If you understand how end users (and other actors)
want to interact with a system, your software team
will be better able to properly characterize
requirements and build meaningful analysis and
design models.
• Hence, requirements modeling with UML begins
with the creation of scenarios in the form of use
cases, activity diagrams.
Scenario-Based Modeling…
• “[Use-cases] are simply an aid to defining
what exists outside the system (actors) and
what should be performed by the system (use-
cases).” Ivar Jacobson
(1) What should we write about?
(2) How much should we write about it?
(3)How detailed should we make our
description?
(4) How should we organize the description?
What to Write About?
• Inception and elicitation—provide you with
the information you’ll need to begin writing
use cases.
• Requirements gathering meetings and other
requirements engineering mechanisms are
used.
• To begin developing a set of use cases, list the
functions or activities performed by a specific
actor.
How Much to Write About?
• As further conversations with the stakeholders
progress, 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
similar to the one proposed.
Developing a Use-Case
• What are the main tasks or functions that are
performed by the actor?
• What system information will the actor acquire,
produce or change?
• Will the actor have to inform the system about
changes in the external environment?
• What information does the actor desire from
the system?
• Does the actor wish to be informed about
unexpected changes?
Swimlane diagram
Class-Based Modeling
• Class-based modeling represents:
• objects that the system will manipulate.
• operations (also called methods or services) that will be
applied to the objects to effect the manipulation.
• relationships (some hierarchical) between the objects.
• collaborations that occur between the classes that are
defined.
The elements of a class-based model include classes and
objects, attributes, operations, CRC models, collaboration
diagrams and packages.
Identifying Analysis Classes
• Examining the usage scenarios developed as
part of the requirements model and perform a
"grammatical parse“.
– Classes are determined by underlining each noun
or noun phrase and entering it into a simple table.
– Synonyms should be noted.
– If the class (noun) is required to implement a
solution, then it is part of the solution space;
otherwise, if a class is necessary only to describe a
solution, it is part of the problem space.
But what should we look for once all of the
nouns have been isolated?
Manifestations of Analysis Classes
• Analysis classes manifest themselves in one of the following ways:

  External entities (e.g., other systems, devices, people) that produce or


consume information.
 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.
Structures (e.g., sensors, four-wheeled vehicles, or computers) that define
a class of objects or related classes of objects.
Potential Classes (to be included in Analysis Model)
• Retained information: The potential class will be
useful during analysis only if information about it
must be remembered so that the system can function.

• Needed services: The potential class must have a set


of identifiable operations that can change the value of
its attributes in some way.

• 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.
• Common attributes: A set of attributes can be defined for
the potential class and these attributes apply to all
instances of the class.

• Common operations. A set of operations can be defined


for the potential class and these operations apply to all
instances of the class.

• 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.
Defining Attributes
• Attributes describe a class that has been selected
for inclusion in the analysis model.
• Build two different classes for professional
baseball players.
–  For Playing Statistics software: name, position, batting
average, fielding percentage, years played, and games
played might be relevant.
– For Pension Fund software: average salary, credit
toward full vesting, pension plan options chosen,
mailing address, and the like.
Defining Operations
• Do a grammatical parse of a processing
narrative and look at the verbs.
• Operations can be divided into four broad
categories:
(1) operations that manipulate data in some way
(e.g., adding, deleting, reformatting, selecting) 
(2) operations that perform a computation
(3) operations that inquire about the state of an
object, and
(4) operations that monitor an object for the
occurrence of a controlling event.
CRC Models
• Class-responsibility-collaborator (CRC) modeling
provides a simple means for identifying and
organizing the classes that are relevant to system or
product requirements.
Ambler describes CRC modeling in the following way:
  A CRC model is really a collection of standard
index cards that represent classes.
The cards are divided into three sections. Along
the top of the card you write the name of the class.
In the body of the card you list the class
responsibilities on the left and the collaborators on
the right.
CRC Modeling
Class Types in CRC
• Entity classes, also called model or business classes, are
extracted directly from the statement of the problem (e.g.,
Floor Plan and Sensor).
• 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.
• Controller classes manage a “unit of work” from start to finish.
That is, controller classes can be designed to manage.
– the creation or update of entity objects;
– the instantiation of boundary objects as they obtain information from
entity objects;
– complex communication between sets of objects;
– validation of data communicated between objects or between the user
and the application.
Responsibilities
• System intelligence should be distributed across classes
to best address the needs of the problem
• Each responsibility should be stated as generally as
possible
• Information and the behavior related to it should reside
within the same class
• Information about one thing should be localized with a
single class, not distributed across multiple classes.
•   Responsibilities should be shared among related
classes, when appropriate.
Collaborations
• Classes fulfill their responsibilities in one of two ways:
–  A class can use its own operations to manipulate its
own attributes, thereby fulfilling a particular
responsibility, or
– a class can collaborate with other classes.
• Collaborations identify relationships between classes.
• Collaborations are identified by determining whether a
class can fulfill each responsibility itself.
• three different generic relationships between classes
 the is-part-of relationship
 the has-knowledge-of relationship
   the depends-upon relationship
A composite Aggregate class
Associations and Dependencies
• Two analysis classes are often related to one
another in some fashion
– In UML these relationships are called associations"
– Associations can be refined by indicating multiplicity
(the term cardinality is used in data modeling.
• 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
Multiplicity
Dependencies
Analysis Packages
• Various elements of the analysis model (e.g., use-cases,
analysis classes) are categorized in a manner that
packages them as a grouping.
• 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.
• Other symbols can precede an element within a package.
• A minus sign indicates that an element is hidden from all
other packages and a # symbol indicates that an element
is accessible only to packages contained within a given
package.
Reviewing the CRC Model
• All participants in the review (of the CRC model)
are given a subset of the CRC model index cards.
– Cards that collaborate should be separated (i.e., no
reviewer should have two cards that collaborate).
• All use-case scenarios (and corresponding use-case
diagrams) should be organized into categories.
• The review leader reads the use-case deliberately.
– As the review leader comes to a named object, she passes
a token to the person holding the corresponding class
index card.
• When the token is passed, the holder of the class
card is asked to describe the responsibilities noted
on the card.
– The group determines whether one (or more) of the
responsibilities satisfies the usecase requirement.
• If the responsibilities and collaborations noted on
the index cards cannot accommodate the use-case,
modifications are made to the cards.
– This may include the definition of new classes (and
corresponding CRC index cards) or the specification
of new or revised responsibilities or collaborations on
existing cards.

You might also like