0% found this document useful (0 votes)
57 views9 pages

Chapter 4 (Interaction Diagrams) - Sequence Diagrams, Collaboration Diagrams, Dfds

The document discusses different types of interaction diagrams in UML including sequence diagrams, collaboration diagrams, and data flow diagrams. Sequence diagrams show the step-by-step flow of activities and data between objects over time using messages. Collaboration diagrams show interactions between objects and the organization of objects. Data flow diagrams represent the flow of data in a system using actors, processes, and data stores. Examples of each type of diagram are provided to illustrate how to draw the diagrams for an e-commerce system.
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)
57 views9 pages

Chapter 4 (Interaction Diagrams) - Sequence Diagrams, Collaboration Diagrams, Dfds

The document discusses different types of interaction diagrams in UML including sequence diagrams, collaboration diagrams, and data flow diagrams. Sequence diagrams show the step-by-step flow of activities and data between objects over time using messages. Collaboration diagrams show interactions between objects and the organization of objects. Data flow diagrams represent the flow of data in a system using actors, processes, and data stores. Examples of each type of diagram are provided to illustrate how to draw the diagrams for an e-commerce system.
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/ 9

CHAPTER FOUR

INTERACTION DIAGRAMS

Areas to be covered:
 Sequence diagrams
 Collaboration diagrams
 Data Flow diagrams
Introduction
Interaction diagrams:

• It is a subset of behavioral diagrams.


• It depicts the interaction between two objects and the data flow between them.
• Following are the several interaction diagrams in UML:
 Sequence diagram
 Collaboration diagram
 Data flow diagram
Sequence Diagrams
• Are used to show the step by step sequence of activities and data flow in a system
• Almost looks like an interaction diagram

Rules of Drawing:
• Represent the objects of the system that are interacting – internal objects (system modules), external objects (people),
using a normal rectangle, with the name of the object in it.
Name of object

• Flow of data using full arrow links or dotted arrow links if there is a conditional test.

• Include the name of the data being passed on top or below the arrow.
• Separate each object using a y-axis grid
Sequence Diagrams
Example
An e-commerce system works as follows. A customer checks products online, and if the product search is available,
he/she adds to cart and pays then confirms purchase by paying via mpesa or bank. The company is notified of the
payment details and a delivery agent is also notified of the customer’s residence and the product bought. The
delivery agent sends a confirmation to both the company and the customer that the product will be delivered at a
certain time. When the product is delivered, the customer can then give a review/rating of the service in the e-
commerce platform. If product was not found during product search, he/she can search other products/exit.
Draw a well-labelled sequence diagram to represent the system

Solution
Objects
- Customer
- Delivery agent
- Company
- Products
- Cart
- Payment
- Review
Sequence Diagrams
Customer Products Company Cart Purchase Delivery Review
agent
Product details
Product
Payment option
Customer’s
residence,
product
Payment details

Confirmation of delivery time

Confirmation of delivery time

Review/Rating
Collaboration Diagram
Product details
Customer
Product
Products

Payment option
Cart

Purchase Customer’s
Delivery
residence,
time
product
Delivery Company
agent

Reviews
Review/Rate
Data Flow Diagrams
• Used to represent the actors (users), the processing point of the system, the inputs and outputs between the actors
and the data stores
• The processing point represents the actual system which does everything – receiving inputs, working out computations,
giving outputs, and even updating the database
• Data stores are the data storage locations – database, sim card, table in a database

Rules of Representing: • Use straight lines to join actors and data stores to
• Represent an actor using a finite rectangle the processing point
Name of actor
• Use unidirectional arrows above/below the straight
• Represent the processing point, using an ellipse lines to show direction of input/output, and indicate
Processing the data/information
point
Name of Data Store
• Represent Data stores using parallel horizontal lines, with the name of the data store in between
Data Flow Diagrams
Example
An e-commerce system works as follows. A customer checks products online, and if the product search is available,
he/she adds to cart and pays then confirms purchase by paying via mpesa or bank. The customer gets a payment
notification. The company is notified of the payment details and a delivery agent is also notified of the customer’s
residence and the product bought. The system also updates list of items in stock. The delivery agent sends a
confirmation to both the company and the customer that the product will be delivered at a certain time. When the
product is delivered, the customer can then give a review/rating of the service in the e-commerce platform, and the
company can respond to the reviews. If product was not found during product search, he/she can search other
products/exit. All data (stock, payments, messages, reviews, etc) is managed from a database
Draw a well-labelled data flow diagram to represent the system

Solution
Processing point:
- E-commerce system

Actors:
- Customer
- Company
- Delivery agent
Data Stores:
- database
Data Flow Diagrams
Product search,
updating cart, Review
payment, responses
review
Customer Company

Products,
Payment notification, E-commerce Payment details,
delivery time, Review system delivery time
responses

Products, Payment notifications,


Customer’s
residence,
delivery times, Reviews,
Delivery customer’s residence
product
time
Stock update,
Payment updates,
Delivery Reviews, Review
agent response Database

You might also like