Now that we have looked over the use and creation of Class diagrams we should now look over the rest of the other UML (unified modelling language). These diagrams are often used to support other UML documentation and supports things like the flow of data and the conversation between modules, states and objects.
The UML models that we have at our disposal are as below;
Sequence Diagrams
The diagrams are common kind of interaction diagrams that focuses on the message exchanged between objects. This is commonly used to look at how users and the system interact.
Sequence diagrams model important runtime interactions between the parts that make up the system, these show object instances that play the roles defined in a collaboration.
How these work are that they show the order of the interaction visually by using the vertical axis of the diagram to represent time what messages are sent and when.
A sequence diagram is made up of a collection of participants
Participants – the system parts that interact each other during the sequence
Classes or Objects – each class (object) in the interaction is represented by its named icon along the top of the diagram
Lets break it down
Looking at the sequence diagram example you will see a number of points, firstly lets look at the top.
as you can see in the image there are a collection of boxes, these boxes are representitve of objects, the "Participants". These are the points of which the communication and interaction happen.
Underneath these boxes you will see a number of vertical dashed lines, these are representitive of the "life Lines" the time line of the object. So we look at the timeline as the conversation line/ interaction between the objects.
Let's look over this in the example above. We can see that the example is of a simple process that is making a phone call.
The image displays the break down of the process well and the steps in which the objects interact, this would be process such as picking up the reciever, hearing the dial tone,dialing the number,ringing once the full number has been dialed,audio prompt of the ringing sound,recipent answers, discussion begins.
Sequence diagrams describe how objects interacts in performing an activity.
Tipically a sequence diagram desccribe a single Use Case!
Adding a picture to Flickr (or any online image database). Login, pick an album, upload a picture, etc… Think about the software classes that would be involved – WebGUI (think of this as reporting what the user does), UserAccount, Album, AlbumList, etc…
Don’t forget to check and update their current disk usage. For this diagram show the check coming back as acceptable.. you would do a second diagram for them running over quota.
Sketch a sequence diagram for the “normal” operation of an ATM (i.e. a customer inserts the card, enters his/her PIN, enters the amount, takes the card, and takes the money). The sequence diagram should show the interaction between the different components of the ATM. The ATM consists of the following components:
•screen
•keyboard
•card reader
•money tray
•money output device
•interface to banking server (for modifications of the account data of the customer)
The scenario begins when the player chooses to start a new round in the UI. The UI asks whether any new players want to join the round; if so, the new players are added using the UI.
All players' hands are emptied into the deck, which is then shuffled. The player left of the dealer supplies an ante bet of the proper amount. Next each player is dealt a hand of two cards from the deck in a round-robin fashion; one card to each player, then the second card.
If the player left of the dealer doesn't have enough money to ante, he/she is removed from the game, and the next player supplies the ante. If that player also cannot afford the ante, this cycle continues until such a player is found or all players are removed.
Links to Learning Outcomes |
Links to Assessment criteria |
|
---|---|---|
Anonymous Assessment - Learners assess an anonymous piece of work containing deliberate mistakes against given success criteria.