05-10-2010, 03:10 PM
Prepared by:
B. Bharath Kumar
[attachment=5057]
Introduction to UML:
A model is a simplification of reality that provides a complete description of a system from a particular perspective. We build models so that we can understand the system we are modeling.
The main reasons for the modeling are:
1 Capture structure and technique.
2 Show how system elements fit together.
3 Keep design and implementation consistent.
4 Hide or expose details as appropriate.
5 Promote unambiguous communication.
Building blocks of UML:
*Things*
*Relationships*
*Diagrams*
Things in UML:
Structural things:
*Classes*
*Interfaces*
*Collaborations*
*Use cases*
*Active Classes*
*Components*
*Nodes Classes*
Behavioral things:
*Interactions*
*State machines*
Grouping things:
*Packages*
Annotational things:
*Notes*
Relationships in UML:
1. Dependency
2. Association
3. Generalization
Diagrams in UML:
The diagrams are the actual graphs that show model element symbols of a system. There are different types of diagrams to represent the systems functionality and behavior.
Use Case Diagram: To illustrate the user intersection with the system.
Class Diagram: To illustrate logical structure.
Object Diagram: To illustrate the physical structure of the software.
Deployment Diagram: To shows the mapping of the software- hardware.
Interaction Diagram = Sequence &Collaboration: To illustrate behavior.
State Chart & Activity: To illustrate flow of event diagram.
Use-case Diagram:
A use case diagram shows interactions of actors with a system in terms of functions called use-case. A use case is description of a functionality that the system provides. The actors are external to the system but who interacts with the system; they may be external persons, external system and hardware.
Class Diagram:
A class diagram shows the static structure of classes in the system. The classes represent the “things” that are handled in the system. Class can be related to each other in a number of ways: associated, dependent, specialized or packaged. Class represents attributes and operations.
Object Diagram:
An object diagram is a variant of the class diagram and uses almost identical notation. The difference between the two is that an object diagram shows a number of object instances of classes, instead of actual classes. Objects are written in rectangular box with their names.
State Diagram:
A state diagram is typically a component to the description of a class. It shows all possible states that the object of the class can have and which events cause the state to change. An event can be another object that sends a message to it. A change is called a transition.
Sequence Diagram:
A sequence diagram shows a dynamic collaboration between a numbers of objects and shows an interaction between objects.
Collaboration Diagram:
It is similar to a sequence diagram however the relationships are only shown. If time or sequence of events is important then sequence diagrams are more relevant.
Activity Diagram:
An activity diagram shows a sequential flow of activities. This is typically used to describe the activities performed in an operation.
Component Diagram:
A component diagram shows the physical structure of the code in terms of code components .a component can be a source code component, a binary component or an executable component. A component contains information about logical class or classes it implements.
Deployment Diagram:
A deployment diagram serves to model the hardware used in system implementations, the components deployed on the hardware, and the associations between those components.