Professional Documents
Culture Documents
2
Vul pmdug m. 1.3
UML Introduction UML Introduction [Unit - I, Ch. - 1]
H INTRODUCTION TO UML
[Unit -1, Ch. 1]
model1ng
language
that incorporates
the object -orienteed
UM IS not a
e UMl specifies a Even thougn
concepts.
In
the era of on core
modeling into various
UmL
object- oriented nities
consensus trom
developed a method called O0SE modeling languages, Grady Booch and
code generators
provide a
can termns
Jacobson language, it t o o i s d e v i a t i o n s to b e
e x p r e s s e d in
dming
Rumbaugh developed OMT (Object-Oriented Software Engineering) and later o0ect oriented programming language.
It allows
technique, but
(Object Modeling Technique). billed a s "data modeling
UML IS n o t
sextension mechanisms. The it models "Object
Close
classes.
The Unified deling Language instead of entities,
(UML) started officially
an object modeling" technique, look suspiciously,
like
entityY
focus of UML is to unify the Booch and
in October, 1994. The main
UML, however shows those to
Cxdmination of models used in
OMT methods at Rational Software classes, 'entity objects.
n 1995 Jacobson joined Rational
Corporation. relationship models. Ivar Jacobson called these
Corporation and expands the scope of the UML project such as, extensibility
to incorporate OOSE. included in the UML
nere are some new concepts that are
thread and process,
and constraints,
the contribution of some partners like echanisms, stereotypes, tagged values,
with HP, 1BM, Microsoft, Oracle, Inetelli
distribution and concurrency,
collaborations, activity
patterns and
diagram, retinement,
Corporation, IcON Computing, Texas instruments, Unisys and Rational, UML 1.0 was
interfaces and components and a constra int language.
released. UML 1.0 is a modeling language which is well-defined, expressive, powerful and
applicable to a wide spectrum of problem domains. UML 1.0 was offered for standardization
2 UML Primary Goals
to the
object management group. The primary goals in the design of the UML are,
in 1997, a Semantics Task Force was formed, to formalize the UML specification and that they
to users so
to integrate the UML with other standardization efforts. A revised version of UML (Version (1) Provides a ready-to-use, expressive visual modeling language
can develop and exchange meaningful models.
maintained
1.1) the OMG for standardization. For several years, UML was
was
offered to
2003 new mechanisms to extend the core concepts.
and 1.5. In a
extensibility and specialization
by an OMG Revision Task Force which produced versions 1.3, 1.4 (2) Provides
of UML version 2.0. UML
and expanded set of partners produced an updated specification (3) Be independent of particular programming languages
and development processes.
features.
2.0 is a major revision of UML and includeslarger number of additional
a
(4) Provides the required formal basics for understanding the modeling language.
Definition of UML
********* *****
(5) Encourage the growth of the O0 tools market.
constructing and
for visualizing, specifying, (6) Support development concepts at higher-level.
The UML is a graphical language which
It.is a graphical language
of a software intensive system.
documenting the artifacts standard way to write (7) Integrate' best practices and methodologies.
and set of semantics
and rules. It gives a
provides a vocabulary and system
a s business processes
conceptual things such IMPORTANCE OF MODELING
system's blueprints, covering written in a specific programming
such as classes
as well as concrete things
functions,
schemas and reusable software components. Medeling is the main part of all activities which leads to develop a good software.
database
language, We build models to communicate the designed structure and behavior of the system.
AS a n
with existing methods.
what c a n be done
the envelope of Models are also used to visualize and control the system's architecture.
The UML pushes c o n c u r r e n t distributed
systems
authors targeted the
modeling of
example, the UML domains. UML focuses
on a
standard
Example : To build a dog house, we need to use nails, wood, cêment, bricks, etc. All these
a d d r e s s e s these
the UML adequately be applied in the raw materials are used approximately to construct a house. After having the sketch of
assure
the UML must
standard process. Although,
not a domains
modeling language, organizations and problem the house, you'll likely end up with a dog house. This modeling technique goes with step-
that different
of process, it is our experience
context
by-step.
require different processes.
unifies
Common
metamodel (vwhich Hence modeling is a well-accepted engineering technique. We build architectural
concentrated first on a
are these
Therefore the
efforts
human rendering of visualize the final product. Some mathematicai models
common
rotation (which provides
a
models of houses and high rises to
second on a case
semantics) and
use
that consists
promote a development process can also be build in older to analyze the effects of winds earthquakes on our buildings.
or
authors
The UML
semantics). incremental processes.
and
architectural centric,
iterative
O8JECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PUBLICATIONS
driven, PROFESSiONAL PUBLICATIONS
DEVELOPMENT
ORIENTED
SYSTEM
OBJECT
1.4
UML Introduction |Unit 1, Ch. 1]
UMLIntroduction [Unit I, Ch. 1]
A20Why We Model
PRINCIPLE 2
A model is a
simplification of
reality, and so a model provides the blueprints of a The second principle of UML considers the approaching style" to be its primary fo
system. Models are build to understood better the system we are developing. We can
This is because, the best approach to a given problem in a profound muae
important
visualize the system, with the help of modeling. We can also
specify the structure or If the problem is complex, then mechanized
level of approach is needed or if the give
behavior of a system with the help of modeling. Models also helps us in constructing a solved by making decent approach to it.
task is simple then that should be
system and models also helps us to document the decisions we have made.
Example: Sometimes an executable
model of just the user interfaces is required for so
122 Aims of Modeling networking problems.
Modeling allows us to specify, visualize, construct and document the system to be PRINCIPLE 3
constructed. The third principle ensures the potentiality of the model. fhis means that the mod
build should have strong resemblance with the real world entity which is going
A brief description of above mentioned specifications is one of the major aims o
brought up in the near future or the model should coincide with the situation for whi
privileged to specify the architectural as well as behavioral
modeling, where we are
it is build.
aspects of the system to be organized. It is just a blueprint created by an architect prior
Example: Usually in system development there is a mismatch between the Analysis mad
to the construction.
and Design model. This causes the system built to be different than the system concewe
The following are the aims of modeling,
specified.
and
(1) Specify: UML addresses the specification of all the important analysis, design
PRINCIPLE 4
implementation decision that must be made in developing and deploying a software
The forth and the final principle of modeling says that one cannot reside in p
intensive system.
while constructing single model for the five situations. This is because, the given situatic
to be constructed.
Visualization deals with deep analysis of system
(2) Visualize : adds to
or existing modeled may be
inherently complex causing large sets of models collab
visualization of the requirement (of a project)
Modeling aims that a best referring to the situation.
14th of its total success.
Example: In building constructions, a number of blue prints (plan layouts) like, floor pren
mechanisms which are essential while
Construct: Modeling also provides us elevation, electrical plans, plumbing plans, etc., reveal all the details.
(3)
constructing a system.
1:24 Object Oriented Modeling
credentials
its importance by applying all its
Document Finally, modeling justifies
(4) referred as document. Depending on the most important business or engineering concerns engineers i
to be bounded in a pitce of paper
(specify, visualize, construct) build dynamic models. Each kind of model is organized differently and each has its
ow
focus.
2 3 Principles of Modeling In software, there
cnce its principles are several ways to approach a
model
a modeling language,
As it well known that UML is basically
is
Here four basic principles of modeliny of UiL. Traditional view of software development takes
on algorithmic approach. The mai
will also be related to modeling concepts.
building block of all software is the
procedure or function in this approach. In
PRINCIPLE 1 situations where requirements change and system grows, systems which are built wit
an algorithmic focus will become very hard to maintain.
best models. This is important
refers to the selection of
The first principle of UML model. It
related to building of a The two most common ways algorithmic approach and
because, selection itself
solves many consequences
are
object-oriented approact
the
importance while constructing The contemporary view of software development takes an
essentials which are of primary object-oriented apprd
makes us, view the
The main building block of all software system is the
model. object or class in this approact
DBAS view, An object is a thing which is generally drawn from the
different approaches to build
a system, through a of thevocabulary problem
be
Example: There might or the solution space whereasa class is a description of set of common
and a object-oriented developers
view. a objects. Ever
system analyst's view object has an identity, state and behavior.
PROFESSIONAL PUBLICATIONS
DEVELOPMENT
OBJECT ORIENTED SYsTEM O8JECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PUBLICATI
1.7
1.6 UML Introduction [Unit 1, Ch. - 1] UML Introduction
[Unit -
1, Ch. -
1
For example, consiIder a simple three-tier architecture for a billing system, which involves
a user interface, middleware and a database. We will find concrete objects like buttoms,
E OVERVIEW OF THE UML
for tne purpose
A that vocabulary
menus and dialog boxes in the user interface whereas we find concrete objects like, tables language provides the rules for combining words in
rules focus
vocabulary and
representing entities from the problem domain, including customers, products and orders A whose
d o n . modeling language is a language
in the database. We find objects like transactions and business rules as well as higher-level ne
conceptual and physical representation of a system
view of problem entities like customers, products and orders in the middle layer. and read
well-tormed
how to create
ruies of a language, tell us
The object-oriented approach to software development is decidedly a part of the ad what artifacts to
will quide us in deciding
mainstream Just because it has proven to be of value in building systems in all sorts mlarly a well-defined
W n a t activities and what
process
workers to use to create them and mandge c
of problem domains and encompassing all degree of size and complexity. Also most
documenting
contemporary languages, operating systems and tools are object-oriented
in some C
ML iS language for visualizing, specifying, constructing,
of objects. Object-oriented artifacts of software-intensive system.
fashion, giving greater cause to view the world in terms a
development provides the conceptual foundation for assembling systems out of modeled textuaily and
some
.NET.
h e UML
is a Language for Visualizing : Some events are
components using technology like 12EE or dre modeled graphically. The UML is a graphic ianguage. The UML is more than Just
Object Oriented Modeling is based on four major features namely, a bunch of graphical symbols. Well-defined semantics are hidden behind each L S
(1) Encopsulation: Encapsulation is a property in which data is accumulated and restricted symbol. Like this many developers can work on different aspects.
details of an object are
to a particular area only. It focus on information hiding where
(2) The UML is a Language for Speciftying: Specifying means building models that are
not revealed to others. The details may be its structures and methods.
It acts as a
(5) Releases.
(1) Things or basic elements.
Specifications Respectively. these things.
(6)
Architectural
(2) The relationships existing between
organization of
these thingsS.
Areas of UML which are nothing but meaningful
3 2 Application he diagrams
Different fields and their
be applied in many fields. in the UML
Unified modeling languages
can
R Things
The diagramn
a s follows, under four groups.
relative description is of UML are again classified
nings in case
with Description 1.4.1.
UML shown Fig.
Table1 Application Areas of
in
representation of UML things are
medical appliances,
can also be applied in developing many activities in-
Medical Equipments UML useful reports on the day-to-day
also it can produce with doctors, etc.
transactions
volved during the patient
transac- Annotationai
consisting of various Structural Behavioral Grouping
UMIL is capable of producing reports constructing
soft-
Things Things Things Things
Banking hours which are
in
helptul
tions during bankng
the banks. Classification of Things
Ware essentjal to
RIg 141
because
most essential
TTansporlation
UML's application in transportation
sector
airways,
is
reservation systems, 23Structural Things in UML
c o n s t r u c t i o n of railways,
it helps "Structural things" holds a major place in defining various things in UML notat
etc They are termed as nouns of UML model. Without structural things, UML models don
abstract re-
scientific fields, UML can be applied in developing reflect any meaning. UML defines eight types of structural things. Collectively, these
Cieniiic Sector n
on research made in a particular field called classifiers. They are namely,
ports
routed. (1) Class : A class 1s a description of a collection of objects that share some commo
field where UML's
activities are deeply
This ts a
properties operating, semantics and relationships A class implemeats one or m
Software P'roject
these
software development. Basing on
interfaces. Graphically, a class Is rendered as a rectangle. The representation of ever
Models aetivities during a
various sessions
Mnaynnn handles
ororganizes class includes name, attr1butes and responsibilities.
the proect manager
11odes,
P R O F E S S I O N AL PUBLICATIONS
O8JECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PUBLICATION
DEVELOPMENT
ORIENTED SYSTEM
OBJECT
1.10
ultimate
to be Jse case)
actions
of actions to the
Example describe a set of providing
services
Use cases is
( U s e Case: an
actor (which
actions goes to ellipse.
full
nese
rendered as an
a use case is
C l a s s Name
Window ordpnically,
Example
SIze Attribute Place Order
open () Responsibilities
Fig 14.5 Use Case and
threads.
close () which
consists of processes
just like
class posses objects activity. It
is
(Active Class:
Active in initiating
control
by à Class
(b) An Interface Provided
(a) Interface Example
Flg. 14.3 Interfaces
<< Components > >
with
Collaboration is a place where different
elements of UML interact
(3)
Collaboration:
collaboration is rendered CD drive
behavior. Graphically,
a cooperative
each other to provide
dotted ellipse.
as a Fig 14.7 Compoent
Example (7) Artifacts: It can be defined as a physical and of a system th at
replaceable part
Contains physical information i.e., bits. There are different kinds of deplovniea
Administration artifacts in a system, such.as source
code files, executables and scripts.
The representation of an artifact is the physical packag1ng of source or run
Fig 1A4 Collaboration information. Graphically an artifact is rendered as a rectangle with the km
PROFESSION AL PUBLICATIONS <artifact>> above the name
DEVELOPMENT
SYSTEM
ORIENTED
O8JECT OBJECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PBIICA
1.12 UMLIntroduction (Unit 1, Ch.
UMLIntroduction [Unit 1, Ch. 1]
of steps those Can be perfom
it is behavior that spec1fies the sequence
Exanmple AcrVity : a
rounded rectangle
ig IAA Artiact
(8) Node Node is an element which holds certain locations in the memory. Nodes also
Process Order
contain processing capabilities and a set of components may reside on a node and
may also migrate from one node to another. Graphically, a node is rendered as a
Cube.
Fig LA12Actions
Semantically, these three elements are usually connected to various structur
Example elements, primarily classes, collaborations and objects.
Hub
Grouping things deals with the "Organizational" features of UML. They a
represented by boxes which models can be decomposed into it. An example of gro
things is a "package".
ig o Node Package : Package organizes the design itself. Various structural and behavioral
may be placed inside
kBehavioral Things in UML a package. Graphically, a package is rendered as tabbed
fold
Example
Behavioral things are considered as verbs of a model. These are the 'Dynamic' parts
which represent the behavior of a model with respect to time and space. Behavioral things
are classified into three types. They are, Institution
Rules
(1) Interaction: As the name indicates, interaction represent set of messages exchanged
between the objects. An interaction involves a number of other elements including
Redo
Sending
Flg 1A18Realization
Fig 1A15 Dependencies
From the Fig. 1.4.15, the dependency symbol is represented by a dashed arrow LADiagrams in the UML
proceeding in one direction. The initial position of arrow is named as 'A and forwarding
of a system
ngeneral the UML diagrams reflects the graphical representation
position is named as 'B'. Referring to the symbol we can say that "A is dependent
be developed. For this purpose, UML used thirteen kinds of diagrams. They
are
to
on B"
as, shown in Fig. 1.4. 19.
(2) Associotion: A structural relationship that shows a connection (links) among objects
Is called as an "Association". Association is a "has-A" relationship. It is represented UML Diagrams
as
a component diagram
(Timing Diagram: It is a
relative sequences
across different objects or roles, as opposed to just
(v) Deployment Diagram : A deployment diagram is a special type of class diagram messages.
residue
that used to represent the configuration of the nodes along with their
is and a sequence
of an activity diagram
the static deployment view of an architecture. (vin) Interaction Overview Diagram I t is a hybrid
components. These diagrams are
uses.
diagram. These diagrams having their own specialized
A node typical hosts one or more artifacts.
(2) Dynamic View Diagrams Based this assumption developers of UML specified the rules
on the tor the
followi
and actors such entities,
() Use Case Diagram: These diagrams shows a of use
set cases
addresses the
as a special kind of class and their relationships. These diagrams (0) Names: All the names corresponding to UML'S basic entities, its relationships
static usecase view of a system. The importance of these diagrams is organizing
its supporting models are
categorized under this specification.
and modeling the behaviors of a system.
time-
(2) Scope : Scope is the context that assigns a specitic meaning to the name.
is kind of interaction diagram, that emphasizes the
(i) Sequence Diagram : It a
name Sam
43.1 Specifications rolno
Johnny
01E21A01
Johnson
OEIAI218
02E1AL21
+name
+rollnumber
# std
mi
Fig 1422 Interface and Implementation
In the
Fig. 1.4.22, component is "Air-conditioner" and interface is the
m2
"Ikey". The
m3 component is always represented by one whole
rectangle, with two small rectangles
pierced into it (the whole rectangie). Interface is
calTotal) denoted by a circle and name of
the interface
calAvg) begins with the letter ".
(3) Type and Role : The third comimon division
Plg 14.20Adomments in theClass is type and role. The
class of an entity such type declares the
as, an object or an attribute. A role
From the Fig. 1.4.20, student is the class name. It consists of student's name and of an entity within its describes the meaning
context like a class or
roll number as public values, standard as protected and marks m1, m2, m3 as private component.
Any entity that forms part of the structure of
values. They are represented using predefined format. another entity, then it derives some
of its meaning from its
inherent type and some of its
its context. meaning from its role within
A33 Common Divisions
In UML, "Common Divisions" refers to the separation of entitues according to their TicketOrder
For example, every tool in UML is divided into three categories namely,
designation.
Closs and Object: A class is said to be collection of objects, whereas an object Employee: Person
(1)
UML distinguishes an object by using
represents any real world entity. Graphically,
the same symbol as its class and then underlying the objects name. Modeling of
IS shown in Fig. 1.4.21. Pig, 1423 Part with Role and
Type
class and object
OBJECT ORIENTED SYSTEM
PROFESSIONAL PUBLICATIONS DEVELOPMENT
OBJECT ORIENTED SYSTEM
DEVELOPMENT
PROFESSIONAL PUBLICAT!ONS
UMLS extensibiity mechanisis includes those
mechanisms through wh
which JM Ca
express every detail of a System, he
extensibility mechanisms includes through
dinrerent
about a
particular element ple: Consider the designing a computer
similarly in
desi
They can be have another,
represented by a box with a name included or a box ith EW Or the system. If we are designing a monitor, we
an icon. The should be such tha
names inside the stereotypes can be included have different Hence, the systems design
in
gullimets (< <name>>). dLPu, we a view.
Fig. 1425 Named-stereotype with an Icon These five views collaborates to form a software architecture.
(2) Tagged Values : Tagged values provides new properties to the existing elements.
These values are represented using strings. The strings are enclosed in the brackets
5E UML Approach to Software Architecture
Whenever a software architecture is to be developed, we consider the target
and are placed below the name of the elements. There is a predefined pattern in
various levels of perspectives. This vision of perspection may be different
representation of these elements (i.e.,) first comes the name followed by a separator for
technologists, developers project managers, etc. Thus software architecture is con
and then a value. to be the most
important tool which should satisfy the different categories of pe
Name Value
Therefore, we can say that software architecture not only deals with the struc
(Separator) and behavior but also with
functionality and performance of the system.
The UML approach to the software architecture is
shown in Fig. 1.5. 1.
Server
{Name : Apche| ProcessView Deployment View
Use Case
View
Plg, 14.26 Tagged Value
Design View
Implementation View
Constraint formats the existing system in an elucidating manner either
(3) Constraints :
diagram, as shown in Fig. 1.7.2. are represented in the UML 3s a tabbed folders. Packages may
.74 shoWs, packages
these packages.
0e nested, and the dashed directed lines represent dependencies among
Applet For example, Helloworld depends on the package java.applet, and java.applet depends
on the package java.awt.
java
HelloWorld
HelloWortd applet
paint) Graphics
awt
HelloWorld
Helloworld modeling.
model? What are principles of
Whot is
Q1)
Answer
1.2.4.
Refer Page No. 1.5, Section No.
hello.jpg
() Name the 4 kinds of things in UML
a3)
(i) Explain briefly the classification of things in UML
A1swer
Fig 17.6 HelloWorld Artifacts Refer Page No. 1.9, Section No. 1.4.1.1.
Answer:
Q6) What are the rules of UML? Explain the common mechanisms in UML.
Answer:
Refer Page Nos. 1.17 and 1.18, Section Nos. 1.4.2 and 1.4.3.
Answer