Video Notes Contents
Sequence diagrams are a type of diagram that show how objects in a system or classes in a code interact with each other.
They show the sequence of events.
They help demonstrate or show the requirements of a program.
The example is the interaction that happens at ATM.
In a sequence diagram people are represented by stick figures and objects by rectangles.
Should be in sequential order.
Lifelines are vertical hash lines that show the existence of an object or actor over time. Moving down the line indicates more time is passing.
Lifelines are created for every actor and object.
Think of the steps of the process.
The person will go to the ATM and put their card in.
That will be the first message.
Messages show the information being sent between objects. Sequence diagrams show the order of events.
This is done by, moving down the lifeline with each message.
After the ATM has requested a pin, the user's response is a return message in a dashed line called "pin entered".
The ATM will then ask the bank server to verify the pin. Another alternative frame is employed here to account for the verification or rejection of the pin.
Success in the pin, will result in the ATM then asking the user "How much would you like to withdraw" once again the user responds with a dashed line to include the amount they wish to withdraw.
Unsuccess will result in the ATM rejecting the card.
Sequence Diagram continued from above.
Once all the steps processes are complete, the next step is to add the activation boxes.
Activation Boxes show when and for how long is performing a process. It shows at a glance when they are activate and when they are ideal.
Sequence Diagram: Activation Boxes