UML Sequence Diagrams → Introduction UML/SequenceDiagrams
UML Sequence Diagrams → Basic Notation UML/SD/Basic
UML Sequence Diagrams → Loops UML/SD/Loops UML Sequence Diagrams → Object Creation UML/SD/Creation
UML Sequence Diagrams → Minimal Notation UML/SD/Minimal
Exercises
Explain Sequence Diagram about Machine
Explain in your own words the interactions illustrated by this Sequence Diagram:
Draw a Sequence Diagram for the code (PersonList
, Person
, Tag
)
Consider the code below:
class Person {
Tag tag;
String name;
Person(String personName, String tagName) {
name = personName;
tag = new Tag(tagName);
}
}
class Tag {
Tag(String value) {
// ...
}
}
class PersonList {
void addPerson(Person p) {
// ...
}
}
Draw a sequence diagram to illustrate the object interactions that happen in the code snippet below:
PersonList personList = new PersonList();
while (hasRoom) {
Person p = new Person("Adam", "friend");
personList.addPerson(p);
}
Find notation errors in Sequence Diagram
Find notation mistakes in the sequence diagram below: