Object Oriented Modeling
Object Oriented Modeling
Object Oriented Modeling
• Ch Inaam
• Rana Isharab
• Muhammad Afzaal
• Faizan yaseen
• Muhammad Nawaz
• Muhammad Abubakar
What is a use case diagram?
What is Actor?
• Actor in a use case diagram is any entity
that performs a role in one given system.
This could be a person, organization or an
external system and usually drawn like
skeleton shown below.
what is Use Case?
• A use case represents a function or an
action within the system. It’s drawn as
an oval and named with the function.
what is System?
• The system is used to define the scope of the use
case and drawn as a rectangle. This an optional
element but useful when you’re visualizing large
systems. For example, you can create all the use
cases and then use the system object to define
the scope covered by your project. Or you can
even use it to show the different areas covered in
different releases.
what is Package?
• The package is another optional element
that is extremely useful in complex
diagrams. Similar to class diagrams,
packages are used to group together use
cases. They are drawn like the image
shown below.
Relationships in Use Case
Diagrams
• There are five types of relationships in a use case diagram. They
are
• Association between an actor and a use case
• Generalization of an actor
• Extend relationship between two use cases
• Include relationship between two use cases
• Generalization of a use case
• Book publishing use case diagram
example
• This use case diagram is a visual representation of the process
required to write and publish a book. Whether you’re an
author, an agent, or a bookseller, inserting this diagram into
your use case scenario can help your team publish the next big
hit.
Use case of Book Publishing
A use case for ATM
Online shopping system
What is a data flow diagram?
• A data flow diagram (DFD) maps out the flow of
information for any process or system.
• It uses defined symbols like rectangles, circles and arrows,
plus short text labels, to show data inputs, outputs, storage
points and the routes between each destination.
• Data flowcharts can range from simple, even hand-drawn
process overviews, to in-depth, multi-level DFDs that dig
progressively deeper into how the data is handled.
• They can be used to analyze an existing system or model
a new one. Like all the best diagrams and charts, a DFD
can often visually “say” things that would be hard to
explain in words, and they work for both technical and
nontechnical audiences, from developer to CEO.
• That’s why DFDs remain so popular after all these years.
While they work well for data flow software and systems,
they are less applicable nowadays to visualizing
interactive, real-time or database-oriented software or
systems.
History of the DFD
• Data flow diagrams were popularized in the late
1970s, arising from the book Structured Design, by
computing pioneers Ed Yourdon and Larry
Constantine.
• They based it on the “data flow graph” computation
models by David Martin and Gerald Estrin.
• The structured design concept took off in the
software engineering field, and the DFD method took
off with it.
• It became more popular in business circles, as it was
applied to business analysis, than in academic
circles.
Components of DFD
• External Entity
• Process
• Data store
• Data flow
External entity:-
an outside system that sends or receives data,
communicating with the system being
diagrammed. They are the sources and
destinations of information entering or leaving the
system. They might be an outside organization or
person, a computer system or a business system.
They are also known as terminators, sources and
sinks or actors. They are typically drawn on the
edges of the diagram.
Process:-
• any process that changes the data, producing an output.
• It might perform computations, or sort data based on
logic, or direct the data flow based on business rules.
• A short label is used to describe the process, such as
“Submit payment.”
Data store:-
• Data store: files or repositories that hold information for
later use, such as a database table or a membership
form.
• Each data store receives a simple label, such as “Orders.”
Data flow:-
• Data flow: the route that data takes between the external
entities, processes and data stores.
• It portrays the interface between the other components
and is shown with arrows, typically labeled with a short
data name, like “Billing details.”
DFD rules and tips
• Each process should have at least one input and an
output.
• Each data store should have at least one data flow in and
one data flow out.
• Data stored in a system must go through a process.
• All processes in a DFD go to another process or a data
store.
DFD levels:
There are three levels of DFD:-
1. DFD Level 0
2. DFD Level 1
3. DFD Level 2
DFD Level 0
• DFD Level 0 is also called a Context Diagram.
• It’s a basic overview of the whole system or
process being analyzed or modeled.
• It’s designed to be an at-a- glance view, showing
the system as a single high-level process, with its
relationship to external entities.
• It should be easily understood by a wide
audience, including stakeholders, business
analysts, data analysts and developers.
Example of DFD Level 0
DFD Level 1
1
• DFD Level provides a more detailed breakout of pieces
of the Context Level Diagram.
• You will highlight the main functions carried out by the
system, as you break down the high-level process of the
Context Diagram into its sub processes.
Example of DFD Level 1
DFD Level 2
• DFD Level 2 then goes one step deeper into parts of Level
1.
• It may require more text to reach the necessary level of
detail about the system’s functioning.
Example of DFD Level 2
Examples of how DFD can be used