Star Uml
Star Uml
Aim:- Getting familiarized with the Unified Modeling Language (UML) Environment.
Theory and Sample Output:-
UML describes the real time systems it is very important to make a conceptual
model and then proceed gradually. Conceptual model of UML can be mastered by
learning the following three major elements:
1. Things
2. Relationships
3. Diagrams
Things
Things are the most important building blocks of UML. There are four kinds of things in the UML.
1. Structural things
2. Behavioral things
3. Grouping things
4. Annotational things
1) STRUCTURAL THINGS:
Structural things are the nouns of the UML models.These are static parts of
the model, representing elements that are either conceptual or physical.
There are seven kinds of Structural things.
1. Class
2. Interface
3. Collaboration
4. Use case
5. Active class
6. Component
7. Node
Class:
A class is a description of a set of objects that shares the common attributes,
W in dow
ori gin
S ize
O pen() C
los e () D isp
l a y ()
Interface:
An interface is a collection of operations that specify a service of a class or component.
An interface describes the externally visible behavior of that element.
Graphically the interface is rendered as a circle together with its name.
<<Interface>>
Mous eLis tener
(from event)
mous eClicked() m
ous ePres sed() mous
eReleas ed() mous
eEntered() mous I Window
eExited()
Collaboration:
Collaboration defines an interaction and is a society of roles and other elements
that work together to provide some cooperative behavior that‟s bigger than the
sum of all the elements. Graphically, collaboration is rendered as an ellipse with
dashed lines, usually including only its name as shown below.
Chain of
Responsibility
UseCase:
Use case is a description of a set of sequence of actions performed
by a system for a specific goal for the system.
Graphically, Use Case is rendered as an ellipse with dashed lines,
usually including only its name as shown below.
Login
ActiveClass:
An active class is a class whose objects own one or more
processes or threads and therefore can initiate control activity.
Graphically, an active class is rendered just like a class, but with heavy lines
usually including its name, attributes and operations as shown below.
Event
Management
Suspend()
Flush()
Component:
Component is a physical and replaceable part of a system that conforms
to and provides the realization of a set of interfaces.
Graphically, a component is rendered as a rectangle with tabs, usually
including only its name, as shown below.
orderform.java
Node:
A Node is a physical element that exists at run time and represents a
computational resource, generally having at least some memory and often,
processing capability.
Graphically, a node is rendered as a cube, usually including only its name, as shown below.
server
2) BEHAVIORAL THINGS:
Behavioral things are the dynamic parts of UML models.
These are the verbs of a model, representing behavior over time and space.
1) Interaction:
An interaction is a behavior that consists of a set of messages exchanged among a
set of objects(elements) within a particular context to accomplish a specific task.
2) State Machine:
A state machine is a behavior that specifies the sequence of states of an object in its life
cycle. It defines the sequence of states an object goes through in response to events.
Waiting
3) GROUPING THINGS:
Grouping things are the organizational parts of the UML models. These are
the boxes into which a model can be decomposed.
There is one primary kind of grouping thing with “package”.
Package:
A package is a general-purpose mechanism for organizing elements into groups.
Package is the only one grouping thing available for gathering structural and behavioral things.
Business Rules
Package
4) ANNOTATIONAL THINGS:
Annotational things are the explanatory parts of the UML models.
Annotational things can be defined as a mechanism to capture
remarks, descriptions, and comments of UML model elements.
Note:
A note is simply a symbol for rendering constraints and comments attached
to an element or a collection of elements.
Graphically a note is represented as a rectangle with dog-eared corner
together, with a textual or graphical comment, as shown below.
Note
RELATIONSHIPSINTHEUML:
Relationship is another most important building block of UML. It shows how
elements are associated with each other and this association describes the
functionality of an application. There are four kinds of relationships in the UML:
1. Dependency
2. Association
3. Generalization
4. Realization
Dependency
Dependency
Ex:
Dependent Class Independent Classs
Association:
also describes how many objects are taking part in that relationship.
1 Multipicity 1..n
A B
Rolename Rolename
Association
Ex:
Generalization:
Ex:
Parent Class
Realization:
One element describes some responsibility which is not implemented and the other
Ex:
<<Interface>>
TVSet
Remote
DIAGRAMSINUML:
1) Class diagram
2) Object diagram
3) Use case diagram
4) Sequence diagram
5) Collaboration diagram
6) Activity diagram
7) State chart diagram
8) Deployment diagram
9) Component diagram
1.ClassDiagram
School Department
Student
2. ObjectDiagram
3. UsecaseDiagram
Use Case diagram shows a set of use cases and actors (a special kind of class) and their relationships.
These diagrams address the static use case view of a system. Graphically it is represented as follows:-
Sequence diagram are interaction diagrams. This diagram emphasizes the time-
ordering of messages. These diagrams address the dynamic view of a system. 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).Graphically it is represented as
follows:-
:Person :Bottle
openBottle()
drinkWater()
closeBottle()
5 CollaborationDiagram
Collaboration diagram are also interaction diagrams. These diagrams emphasizes the structural
organization of the objects that send and receive messages. These diagrams address the
dynamic view of a system. Collaboration Diagram displays an interaction organized around the
objects and their links to one another. Numbers are used to show the sequence of
messages.Graphically it is
represented as follows:-
2: drinkWater()
:Bottle :Person
1: openBottle()
3: closeBottle()
6. StatechartDiagram
State chart diagram shows a state machine, consisting of states, transitions, events and
activities. These diagrams address the dynamic view of the system. State Chart diagram
displays the sequences of states that an object of an interaction goes through during its
life in response to received stimuli, together with its responses and actions.
7 .ActivityDiagram
Activity diagram is a special kind of a state chart diagram that shows the flow from activity to activity
within a system. These diagrams address dynamic view of a system. Activity Diagram displays a special
state diagram where most of the states are action states and most of the transitions are
follows:-
8. ComponentDiagram
fraudagent.exe
fraudagent.dll
9. DeploymentDiagram
Deployment diagram shows the configuration of run-time processing nodes and the components that
live on them. These diagrams address the static deployment view of architecture. Deployment Diagram
displays the configuration of run-time processing elements and the software components, processes,
and objects that live on them. Software component instances represent run-time manifestations of code.
Graphically it is represented as
follows:-
Admin Client
admin.exe
<<10-T Ethernet>>