Basic Software Engineering: Prof. Vijya Tulsani Assistant Professor
Basic Software Engineering: Prof. Vijya Tulsani Assistant Professor
Basic Software Engineering: Prof. Vijya Tulsani Assistant Professor
• The DFD also provides information about the outputs and inputs of each entity
and the process itself.
• A data flow diagram has no control flow, there are no decision rules and no
loops.
DFD (Data Flow Diagram)
• DFD takes an input-process-output view of a system. Data flow into the
software & transformed by processing elements & resultant data flow out of
the software.
width
Calculate Area
Area
height
DFD Notations
Data Store: There are two variants of data storage - it can either
be represented as a rectangle with absence of both smaller sides
OR or as an open-sided rectangle with only one side missing.
Data is often stored for later use.
Calculate area
Area
height
area_master
Data Flow Diagram Guidelines
• All icons must be labeled with meaningful names
•A context diagram is a top level (also known as "Level 0") data flow diagram.
•It only contains one process node ("Process 0") that generalizes the function of
the entire system in relationship to external entities.
•A "context level" DFD can be used to show the interaction between a system and
outside entities; it can also show the internal data flows within a system. This
version is also called a context diagram.
Levels of DFD
Context Level DFD (0 Level / Zero Level):
•A level 1 DFD notates each of the main sub-processes that together form the
complete system.
•We can think of a level 1 DFD as an “exploded view” of the context diagram.
Levels of DFD
Constructing Level 1 DFD:
•If no context diagram exists, first create one before attempting to construct the
level 1 DFD.
•Add data-flows flowing between processes and data stores within the system.
Each data store must have at least one input data-flow and one output data-flow
•Check diagram. Each process should have an input and an output. Each data store
should have an input.
Levels of DFD
Level 1 DFD Example:
•A level 2 DFD explodes more summarized processes and shows another level of
complexity within them.
•A level 3 or 4 DFD shows even more components opened up to show their inner
details.
Levels of DFD
Level 2 DFD Example:
Image
Image source
source :: Google
Google
Levels of DFD
Level 2 DFD Example:
• It holds information about the database and the data that it stores.
•Attribute size
• Columns
• Constrains
• Variable Format
• Data Type
• And more
Importance
• Avoid Duplication
• The only prerequisite for a data dictionary is that it should be easily searchable.
Example - 1
• Table: Employees
• Holds data about organization’s current and past employees. Each row
represents one person.
Example - 1
Example - 2
• Table: Students
• Holds data about university’s students. Each row represents one person.
Example - 2
UML Overview
• UML is a standard language for specifying, visualizing, constructing and
documenting the artifacts of software systems.
• UML was created by Object Management Group and UML 1.0 specification
draft was proposed to the OMG in January 1997.
• visualizing
• specifying
• constructing
• documenting the artifacts of a software
Why UML?
• Use graphical notation: more clearly than natural language (imprecise) and
code (too detailed).
• Class Diagram
• Activity Diagram
• Sequence Diagram
Use Case Diagram
• A use case diagram at its simplest is a representation of a user's interaction
with the system that shows the relationship between the user and the
different use cases in which the user is involved.
Notation of Use Case Diagram
• Actor: An Actor is outside or external the system. It can be a:
• Human
• Peripheral device (hardware)
• External system or subsystem
• Time or time-based event
Patient
Notation of Use Case Diagram
Use Cases: A use case (Attribute) is a summary of scenarios for
a single task or goal.
•Represented by oval.
Notation of Use Case Diagram
Relationships: Represent communication between actor and use case
•Represented by line or double-headed arrow line
•Also called association relationship
Make
Appointment
Patient
Notation of Use Case Diagram
Boundary: A boundary rectangle is placed around the perimeter of the system to
show how the actors communicate with the system.
Make
Make
Appointment
Appointment
Patient
Example 1: ATM System
•It is shown as a dotted line with an arrow point and labeled <<extend>>.
Use Case Relationships
General Relationships:
•Generalization is a relationship between a general use case and a more specific
use case that inherits and extends features to it.
•It is shown as a solid line with a hollow arrow point.
Use Case Relationships
Uses Relationships:
When a use case uses another process, the relationship can be shown with the
uses relationship.
This is shown as a solid line with a hollow arrow point and the <<uses>>
keyword.
Use Case Relationships
Include Relationships:
Include relationships insert additional behavior into a base use case.
They are shown as a dotted line with an open arrow and the key word
<<include>>
Example 2: Online Airline Reservation
/ age : Date
Class Attributes (Cont’d)
Attributes can be:
+ public
# protected
- private
/ derived
Class Operations
Operations describe the class behavior and
appear in the third compartment.
Relationships
There are three kinds of relationships in UML:
dependencies
generalizations
associations
Dependency Relationship
A dependency indicates a semantic relationship between two or more
elements.
Student Instructor
Association Relationship (Cont’d)
We can indicate the multiplicity of an association by adding multiplicity
adornments to the line denoting the association.
Student Instructor
1..*
Association Relationship (Cont’d)
The example indicates that every Instructor has one or more Students:
Student Instructor
1..*
Association Relationship (Cont’d)
We can also indicate the behavior of an object in an association (i.e., the role
of an object) using rolenames.
Symbol Meaning
1 One and only one
0..1 Zero or one
M..N From M to N (natural language)
* From zero to any positive integer
0..* From zero to any positive integer
1..* From one to any positive integer
Example 1: ATM System