1/15
Looks like no tags are added yet.
Sequence diagrams and what it shows?
It shows dynamic communications. The diagram shows behavior as it happens and shows messages being sent between different objects or participants. Time progresses top to bottom. It shows methods calls with horizontal arrows.
Communication/Collaboration Diagram
Objects can be put anywhere. So method calls are numbered to show their ordering.
Example of a communication/collaboration diagram

Sequence diagrams vs. Communication/Collaboration Diagrams
Sequence diagrams: easier to see sequence of method calls over time. More expressive UML notation. Better support from many tools.
Communication/Collaboration Diagrams: Easier to fit on limited space. Easier to change as you improve your understanding.
How to read a communication diagram?
The makePayment(cash) method is called from a Register object. The Register object then calls the method in the Sale object which then runs it. The Sale object creates a new object called Payment.

Activity diagrams
Show the activities/steps that take place. It is done to implement a use case and to describe the logic of how some operation works.
Activity diagram symbols

Activity diagram connectors

Example of an activity diagram

Activity Diagram showing fork and join notation

State Diagrams
Called Statechart Diagrams and also called State Machine Diagrams. It is used if the state of the system is important and states that the system can be in.
Transitions that cause it to change.
Basic UML state diagram

What state diagrams show?
It shows the different states that the system can be in during its lifetime and the events/transitions that cause it to change from one state to another. Mostly used for systems that are reactive (the state they are in is important and they sit in a state until an event occurs that cause them to change to another state).
Differences between activity and state diagrams
State diagrams shows how a system changes over its lifetime. Useful when the state of the system is important. Needs an external event to take place in order to move from one node to the next node along an arrow. Activity diagram shows the flow of actions that take place in a specific task. Useful when the steps in a task, and their ordering is important. Always goes along an arrow from one node to the next as soon as a node finishes what it was doing.
UML packages
Drawn as a rectangle with a smaller tab at the upper left. Used to show the high level organization of a project. Packages group elements. A dashed arrow between packages indicates a dependency (X depends on Y if X calls one of Y’s methods, or any of its instance variables is a Y object.)
Example of dependencies shown in UML package diagram
