CO835 – OBJECT-ORIENTED SYSTEMS
Sequence
Assignment 4
Ahmad Aslami
Liam Mcdougall
John Clyde Marion Morales
Gauravkumar Bharatbhai Patel
1. What are Sequence diagrams, and what are they used for
specifically?
Sequence diagrams are typically a part of UML and they are used in software
engineering and systems analysis it represents the interaction and sequences of
message or actions between the various components or objects inside the whole
system they display that how the various components work together and also the
dynamic behavior of the specific task
Modeling behavior:
Sequence diagrams are mainly used to model dynamic behavior. They are
shown in order which components to interact with the components and
how they communicate with each other, and to provide a representation of
the system, runtime behavior. We can use the sequence diagram.
Identifying potential issues:
By visualizing the interactions, sequence diagrams can help identify
bottlenecks, inefficiencies, or flaws in the system. They Assist in finding
missing or incorrect interactions.
Communication and Collaboration:
To illustrate the collaboration and interaction between the various
components, we can use the sequence diagram and by doing this we can
include the various objects classes and many more external entities. Apart
from that, it will show the dependencies and relationships.
Understanding Processes:
To understand that how one type of process or use case is executed we can
use the sequence diagram. It makes all the things easier by providing the
sequence of the message or method among various objects.
2. Provide a concrete example of a sequence diagram from
Automated Teller Machines (ATM)
Sequence Diagram example:
• Customer inserts their ATM card into machine.
• ATM machine reads card.
• validates it with the bank database.
• ATM will check the customer data with the bank database.
• Then if the information will be ok then it will display some option like
withdrawal, deposit etc.
• Then it will ask for the account type for example saving, current etc.
• After that it will ask for amount of money and also for PIN.
• It will validate the PIN and then do the transaction.
• ATM will dispense the money along with the receipt and then ask for to
remove card.
• Customers remove the card and take the money.
3. How are the different types of relationships represented in a Class
diagram?
In software modeling, sequence, and class diagram both have a different purpose
but complementary roles. A class diagram gives us an information about the
system view, classes, interfaces, methods, relationships like inheritance,
association etc. However, sequence diagram provides an information related to
processes in real-time, interaction between the order and orderController
objects. And it shows us that how’s all the order processing in the sequences.
Sequence and class both diagram types complement each other because the class
diagram provides various stages by defining the structural element. However,
sequence diagram provides the information that how’s all the elements interact
with each other and how’s the process execute.
For example, online ordering system. In that, a class diagram shows a defines
classes like cart, order and order controller and also detail information about their
attributes and associations, which provide us the structural framework, while
sequence diagram give an information that how’s the real order it taken and then
how the items can be put in cart etc. It provides the dynamically interactions
between the order and orderController and their sequence.
4. Draw a Class diagram to illustrate the course registration activity
for full-time students at Mohawk College all the way to making
payments.
The purpose of forward horizontal connection is the period during a object is
actively engaged, processing an operation. It shows that the object begins
working on its task, and when it’s completed.
The purpose of backward horizontal connection is that it illustrates the period
when object is inactive. It technically means “waiting” time between activities.
a. Customer object: forward activation bar begins when they start the order
and select products. It’s completed when they confirm order by going on
“checkout”. The bar shows how long the customer is interacting with the system.
b. Order Processing System: This bar starts when it receives the order request
that the customer has sent. It checks product availability, updating order, and
processing order. The end of this bar is when the system completes the task.
c. Payment Portal: this object begins when its received full payment details
from order processing system and begins processing the payment transaction.
Payment is successful on this bar.
d. Backward Horizontal Connection (Waiting time) between these forward
activation bats, there are backward horizontal connections. Customer confirms
the order, then there’s a period of waiting, due to system processing order. In this
time, Customer is just waiting for system to respond.
5. Draw a comprehensive Sequence diagram for full-time student
registration at Mohawk College.
REFERENCES
What is Sequence Diagram?. Retrieved from Visual Paradigm.
https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-
is-sequence-diagram/