Friday, June 26, 2009

Exercise 20: Modeling with UML

Question 1.
Use Case, Class, Sequence, Collaboration, State chart, Activity, Component and Deployment diagrams are used in UML. Describe each of the eight (8) main diagrams used in UML.

The 8 main diagrams in UML are as follows:

Use Case
A use case is a set of scenarios that describe an interaction between a user and a system. A use case diagram displays the relationship between actors and use cases. The two main components of a use case diagram are use cases and actors. The two components look like the following:


An actor represents a user or another system that will interact with the system you are modeling. A use case is an external view of the system that represents some action the user might perform in order to complete a task.

Class
A Class diagram is used to describe the types of objects in a system and their relationships. Classes are composed of three things: a name, attributes, and operations.

Here is an example of a Class diagram:


Sequence
A Sequence Diagram displays the time sequence of the objects participating in the interaction. This consists of the vertical dimension (time) and horizontal dimension (different objects).

Here is an example of a Sequence diagram:




Collaboration
A Collaboration Diagram displays an interaction organised around the objects and their links to one another. Numbers are used to show the sequence of messages.

Here is an example of a Collaboration diagram:



State
A State diagram is used to describe the behaviour of a system. State diagrams describe all of the possible states of an object as events occur. Each diagram usually represents objects of a single class and track the different states of its objects through the system.

Here is an example of a State diagram:



Activity
Activity diagrams describe the workflow behaviour of a system. Activity diagrams are similar to state diagrams because activities are the state of doing something. The diagrams describe the state of activities by showing the sequence of activities performed. Activity diagrams can show activities that are conditional or parallel.

Here is an example of an Activity diagram:




Component
A Component diagram contains components and dependencies. Components represent the physical packaging of a module of code. The dependencies between the components show how changes made to one component may affect the other components in the system. Dependencies in a component diagram are represented by a dashed line between two or more components. Component diagrams can also show the interfaces used by the components to communicate to each other.

Deployment
The Deployment diagram contains nodes and connections. A node usually represents a piece of hardware in the system. A connection depicts the communication path used by the hardware to communicate and usually indicates a method (eg TCP/IP).

The Component and Deployment diagram can be combined into one physical diagram.

Here is an example of a combined Component and Deployment diagram:



References
Types of UML Diagrams. (n.d). Retrieved on July 15, 2009, from http://atlas.kennesaw.edu/~dbraun/csis4650/A&D/UML_tutorial/diagrams.htm

No comments:

Post a Comment