Sequence Diagram for the ATM System
Create a sequence diagram for how to complete the balance inquiry using an ATM.
We'll cover the following
A sequence diagram is a great way to understand the interactions between different entities and objects in the system. There can be different sequence diagrams that we can create for our ATM. For the sake of this lesson, we will create sequence diagrams for balance inquiry from ATM.
Balance inquiry
The sequence diagram for how to complete the balance inquiry using an ATM should have the following actors and objects that will interact with each other:
Actors:
Cardholder
,Card issuer
Objects:
ATM
andPrinter
Here are the steps for balance inquiry from ATM:
The cardholder inserts their ATM card into the ATM.
The ATM then asks the cardholder for their PIN.
The cardholder enters their PIN code, and the ATM sends the code to the card issuer for verification.
The card issuer verifies the PIN code:
If the PIN is valid, the card issuer sends a message back to the ATM indicating that the verification was successful.
The ATM then displays the main menu to the cardholder.
The cardholder selects the balance inquiry option.
The ATM sends a message to the card issuer to get the account balance, and the card issuer returns the balance to the ATM.
The ATM displays the balance to the cardholder and asks if they would like a receipt printed.
If the cardholder selects "yes," the ATM sends a message to the printer to print a receipt and ejects the ATM card.
If the cardholder does not want a receipt, the ATM card is simply ejected.
If the PIN is not verified, and the ATM card is simply ejected.
Based on the order above, the sequence diagram of balance inquiry from ATM is given below.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.