Requirement Modeling
Requirement Modeling
Requirement Modeling
system
description
analysis
model
design
model
Elements of Requirements Analysis
Scenario-Based Modeling
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
Wall Indicator Meaning
0..1 Zero or one
1 One only
0..* Zero or more
1..* One or more
1 1 1 n Only n (where n > 1)
is used to build is used to build
0..n Zero to n (where n > 1)
1..n One to n (where n > 1)
1..* 0..* is used to build 0..*
DisplayWindow Camera
<<access>>
{password}
Environment
+Tree
+Landscape
+Road
+Wall
+Bridge
+Building RulesOf TheGame
+VisualEffect
+Scene +RulesOfMovement
+ConstraintsOnAction
Charact ers
+Player
+Protagonist
+Antagonist
+SupportingRole
Class Types
Entity classes, also called model or business classes, are extracted directly
from the statement of the problem (e.g., FloorPlan 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 represent coordination, sequencing, transactions, and
control of other objects and are often used to encapsulate control related to
a specific use case.
Control classes are also used to represent complex derivations and calculations,
such as business logic, that cannot be related to any specific, long-lived information
stored by the system (ie. a specific entity class).
All notations of Class Diagram
Example
Saturn Int. management wants to improve their security measures, both for their building
and on site. They would like to prevent people who are not part of the company to use
their car park.
Saturn Int. has decided to issue identity cards to all employees. Each card records the
name, department and number of a company staff, and give them access to the company
car park. Employees are asked to wear the cards while on the site.
There is a barrier and a card reader placed at the entrance to the car park. When a driver
drives his car into the car park, he/she inserts his or her identity card into the card reader.
The card reader then verify the card number to see if it is known to the system. If the
number is recognized, the reader sends a signal to trigger the barrier to rise. The driver can
then drive his/her car into the car park.
There is another barrier at the exit of the car park, which is automatically raised when a car
wishes to leave the car park.
A sign at the entrance display “Full” when there are no spaces in the car park. It is only
switched off when a car leaves.
There is another type of card for guests, which also permits access to the car park. The card
records a number and the current date. Such cards may be sent out in advance, or
collected from reception. All guest cards must be returned to reception when the visitor
leaves Saturn Int.
Analysis Class/Candidate Class Identification
Saturn Int. management wants to improve their security measures, both for their building
and on site. They would like to prevent people who are not part of the company to use
their car park.
Saturn Int. has decided to issue identity cards to all employees. Each card records the
name, department and number of a company staff, and give them access to the company
car park. Employees are asked to wear the cards while on the site.
There is a barrier and a card reader placed at the entrance to the car park. When a driver
drives his car into the car park, he/she inserts his or her identity card into the card reader.
The card reader then verify the card number to see if it is known to the system. If the
number is recognized, the reader sends a signal to trigger the barrier to rise. The driver can
then drive his/her car into the car park.
There is another barrier at the exit of the car park, which is automatically raised when a car
wishes to leave the car park.
A sign at the entrance display “Full” when there are no spaces in the car park. It is only
switched off when a car leaves.
There is another type of card for guests, which also permits access to the car park. The card
records a number and the current date. Such cards may be sent out in advance, or
collected from reception. All guest cards must be returned to reception when the visitor
leaves Saturn Int.
Potential Classes
Car Park
Employee
Barrier
Card Reader
Signal
Staff Card
Guest Card
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. 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.
Refer : http://agilemodeling.com/artifacts/crcModel.htm
Class diagram
CRC Modeling
Class:
Class:
Description:
Class:
Description:
Class: FloorPlan
Description:
Responsibility:
Description: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
defines floor plan name/type
manages floor plan positioning
scales f loor plan for display
scales f loor plan for display
incorporates walls, doors and windows Wall
shows position of video cameras Camera
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
computer
input based output
system
Flow Modeling Notation
external entity
process
data flow
data store
External Entity
base
compute
triangle area
height area
Data Stores
sensor #
sensor #, type,
look-up location, age
sensor
report required data
type,
location, age
sensor number
sensor data
Data Flow Diagramming: Guidelines
Review user scenarios and/or the data model to isolate data objects and use
a grammatical parse to determine “operations”
Determine external entities (producers and consumers of data)
Nouns are either external entities (boxes), data or control objects (arrows),
or data stores (double lines).
Verbs are processes and can be represented as bubbles in subsequent DFD.
LEVEL – 1 DFD
LEVEL – 2 DFD
Behavioral Modeling
make a list of the different states of a system (How does the system
behave?)
indicate how the system makes a transition from one state to another
(How does the system change state?)
indicate event
indicate action
draw a state diagram or a sequence diagram
Sequence diagram
Collaboration/Communication Diagram
Thank you!!!
Any Questions???