Monday, May 25, 2009

Exercise 20

Exercise 20: Modelling with UML

Describe each of the eight main diagrams used in UML.
At the centre of the UML are its nine kinds of modelling diagrams, which we describe here.
• Use case diagrams
• Class diagrams
• Object diagrams
• Sequence diagrams
• Collaboration diagrams
• Statechart diagrams
• Activity diagrams
• Component diagrams
• Deployment diagrams
(Miller, 2008)
Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is on what a system does rather than how.
Class diagram gives an overview of a system by showing its classes and the relationships among them. Class diagrams are static -- they display what interacts but not what happens when they do interact.
Object diagrams show instances instead of classes. They are useful for explaining small pieces with complicated relationships, especially recursive relationships.
Sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. Sequence diagrams are organized according to time. The time progresses as you go down the page

Collaboration diagrams are also interaction diagrams. They convey the same information as sequence diagrams, but they focus on object roles instead of the times that messages are sent. In a sequence diagram, object roles are the vertices and messages are the connecting links.

A state chart diagram shows the possible states of the object and the transitions that cause a change in state.

An activity diagram is essentially a fancy flowchart. Activity diagrams and statechart diagrams are related. While a state chart diagram focuses attention on an object undergoing a process (or on a process as an object), an activity diagram focuses on the flow of activities involved in a single process. The activity diagram shows the how those activities depend on one another.

A component is a code module. Component diagrams are physical analogs of class diagram.

Deployment diagrams show the physical configurations of software and hardware.

No comments:

Post a Comment