Professional Documents
Culture Documents
Diagrams
Table of Contents
• Modeling
• Class diagram
• Use case diagram
• Sequence diagram
• Activity diagram
• E-R diagram
• Data flow diagram
Modeling
• A model is an abstraction of something for the purpose of
understanding it before building it.
- Both physical models and computer models are usually
cheaper than building a complete system.
- Communication with customers
- Visualization
- Reduction of complexity
- Abstract view of the system
Class Model
• A class describe a group of objects with the same properties.
• Objects in a class have the same attributes and behaviour.
• Class diagram provides a graphical notation for modelling
classes and their relationships.
Attributes and Operations
• Include relationship
• Exclude relationship
• Generalization relationship
Guidelines for use case diagrams
o One to one
o One to many
o Many to one
o Many to many
Participation Constraints
• Total Participation − Each entity is involved in the
relationship. Total participation is represented by double lines.
E.g. every loan entity to be related to at least one customer
through borrow relationship.
Produce Product
Store Product
Payment Approval
Order Raw Materials
4.3
Pay for Raw Materials Pay
Employe
e PAYMENTS
Pay for Labor
Payment
Process Decomposition
1.1 1.2
1.0
Record Receive
Sale
Order Payment
0.0
Lemonade
System
3.1
3.0 3.2 3.3
Produce
Procure- Receive Pay
Purchase
ment Items Vendor
Order
4.1 4.3
4.2
4.0 Record Pay
Calculate
Payroll Time Employe
Payroll
Worked e
75
Continued…
76
Control Flow Model
(CFD)
• The CFD shows the same processes as in DFD but rather than showing
data flow they show control flows.
• CFD show how events flow among processes. It also shows how
external events activate the processes.
• The dashed arrow is used to represent the event.
• A solid bar is used to represent the window. This window is used to
control the processes used in the DFD based on the event that is passed
through the window.
• Instead of representing control process directly in the model the
specifications are used to represent how processes are controlled.
• When a data input is given to the process a data condition should occur
to get the control output.
• There are two commonly used representation of specification: Control
Specification(CSPEC) & Process Specification (PSPEC).
77
Designing Control Flow
Diagrams
• There are certain applications which are event driven rather
than being data driven. They produce control information rather
than producing data. Such applications can be modeled with the
control information along with data flow modeling.
• A graphical model used to represent the control information
along with the data flow model is called control flow model.
• Following guidelines are used to draw CFD:
o List all sensors that can be read.
o List all the interrupt conditions.
o List all the data conditions.
o List all the switches actuated by the operator.
o Use noun/verb parsing techniques to identify control information.
o Describe behaviour of system by identifying the states. Define the transition between the
states.
o Avoid common errors while specifying the control.
78
Example (CFD)
CFD DFD
Obtained
temperature
Maximum Check &
convert
temperatur
temperature Converted
e
temperature
PSPEC
If obtained temp > max temp
set above_temp = TRUE
Else
set above_temp = FALSE
Begin
temp_conversion algorithm
End
End if;
79
Control Specification
(CSPEC)
• The CSPEC is used to represent two things –
o The behaviour of the system when an event occurs.
o The processes that get invoked on occurrence of particular event.
80
Process Specification
(PSPEC)
• The PSPEC is used to describe the inner workings of the
process represented in a data flow diagram.
• The process specification describes the input to the function,
the algorithm, constraints imposed by the function,
characteristics of the process.
• The process specification is used to describe the working of
the process.
• The process specification is given by Program Design
Language (PDL).
81
Continued…
• The data dictionary defines the data unambiguously.
• One can give the detailed description of data items using data
dictionary.
• For large systems size of data dictionary will be large and will
be hard to maintain manually. So for such large system
automated tools (CASE) is used.
82
Example
Name: Passenger
Alias: None
Where used/ How used: Passenger’s query (input)
Ticket (output)
Description:
Passenger = Passenger_Name + Passenger_Address
Passenger_Name = Last_name + First_name + Middle_name
Passenger_Address = Local_address + Community_address + Zip_code
Local_Address= House_number + Street_name +
(Appartment_name)
Community_Address= City_name + [State_name | Province_name]
83
State Diagrams
• A state diagram is used to represent the condition of the
system or part of the system at finite instances of time. It’s
a behavioral diagram and it represents the behavior using
finite state transitions. State diagrams are also referred to
as State machines and State-chart Diagrams. These terms
are often used interchangeably. So simply, a state diagram is
used to model the dynamic behavior of a class in response to
time and changing external stimuli. We can say that each and
every class has a state but we don’t model every class using
State diagrams. We prefer to model the states with three or
more states.
Uses of statechart
diagram
• We use it to state the events responsible for change in state
(we do not show what processes cause those events).
• We use it to model the dynamic behavior of the system .
• To understand the reaction of objects/classes to internal or
external stimuli.
Conti…
• Firstly let us understand what are Behavior diagrams? There
are two types of diagrams in UML :
94
Continued…
• Data dictionary stores following information:
Name Description
Name Primary name of data or control item, the data store or external
entity
Alias Other name used for the name
Where-used or Describes where the data control item is used and how the item
how is used is used
• Notations used in data dictionary are:
Data Construct Notation Meaning
Composition = Is composed of
Sequence + And
Selection [|] Or
Repetition { }N Repetition of N items
( ) Optional data
*…* Commented information
95
Any Questions??
THANK YOU