You are on page 1of 14

1.

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

of abstractions thus restricting them to combine.


precise, unambiguous, and complete. In particular, the UML addresses the
division line between various types
Specification of all the important analysis, design and implementation decision that
(2) Abstraction: property, where only that information of an object
Abstraction refers to a

abstract information must be made in developing and deploy1ng a software-intensive system.


is revealed which causes it to differ from different objects. This
to form the entire details of an object. Thus abstraction reveals only the (G) The UMLis a Longuage for Constructing: UML'S models are directiy connected to a
is enough
outer view of an object, separating all it's major details from
their implementation.
variety of programming languages. We can map from a model in the UML to a
abstraction where the
These abstraction may differaccordingly like the co-incidental programming language such as C++ Java. Th1s mapping permits both forward and
considers various types of operations which differs from
each other or the
object reverse engineering.
which are confined
virtual machine abstraction where the differet types operations
by higher-level controls, etc. Forward engineering is the
to an object is handled certain generation of code from a UML model into a
at a time and managing programming language whereas
Hierarchy: Some applications gathers many abstr actions
reverse engineering requires the tool support with
(3)
a new concept of human intervention.
them all at once may be a bottle neck. To avoid such situations,
The situations which
object oriented paradigm was revealed known as Hierarchy.
levels and each combining, both forward and
By reverse
are incapable of managing at once may be divided inio
numr ef engineering yields round -trip
of these levels are referred as an hierarchy. Sometimes, the hierarchy may t? defined
engineering. This means that the ability to work in either a graphical or a textual
as an ordering of abstractions.
view, while tools keep the two views consistent.

of number of objects. The UML is


Example: Assume that there is a small abstraction consisting large sufficiently expressive and unambiguous to
When hierarchy concepts are implemented in this abstraction, then we can say that of models on dirct permit the direct execution
this is a is a' hierarchy whereas it's supporting objects forms "part of " hierarchy. marketing and also the simulation of
instrumentation of rurning systems and the
systems.
of dividing a single
(4) Modularity: "Modularity" as the name suggest, it is a process 0 The UML is
module into number of modules. The various modules formed due to division process
Language for Documenting: The UML addresses
a

the the documentation of


forms well defined boundaries. Classes and Objects forms the main elements of
system's architecture, and all of its details.
The UML also
different modules forming the
for
expressing requirements and for tests. The UML provides a language
object oriented languages. These are said to be
the activities of project planning and provides a
language for modeling
architecture of the object oriented system,.
release
management.
OBJECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PUBLICATIONS OBJECT ORIENTED SYSTEM DEVELOPMENT
PROFESIONAL PUBLICATIONS
UML Introduction [unit 1, Ch. - 1] UML Introduction (Unit 1, Ch. - 1]
1.8
UML
Artifacis of UML RLECONCEPTUAL MODEL OF THE
a
conceptuai mooe
need to build
we
development procedure. Few of now the UML works re,
irom the sortware Ihey
These are the terms concluded d three major elements.
d d this requires learning
these artifacts includes,
(1) UML'S basic building blocks. with each other
(1) Project Plans. interdc
dictate how these building blocks may
Rules that
the un-
(2) Design Issues.
mechanisms that apply throughout
Some common
(3) Various Requirements.

Building Blocks of the UML


(4) Testing Procedures.
blocks namely,
UML IS based on three major building

(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

Things or Basic Elements


Description
Fields of UML

UML c a n be applied to design blue print of artil-


Defence Sectors In defence sectors,
leries and mechanized weapon
systems.

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

UML Introduction [Unit 1, Ch. 1) the


UML Iniroduction [Unit - I, Ch. - 1 and
performed

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

Fig 14.2 Class


concurrent
are
essential is
and threads behavior
nese processes
elements
whose
represents iines on the
objects double
specify service of a class or component. except that its with
collection of operations that a d Class
as a class
(2) Inteface: It is a it is
rendered
service elements. Graphically,
element. An interface specify With other
Tt describes internally visible behaviour of the
the complete behavior or only left and right.
but it does not. implements them. It might represent
The declaration of an interface
is same as class with Example
a part of behavior of a class.

<<interface> > keyword above the name.


Employer
as a small Circle
A class provides a n interface to
the outside world is shown
interface from s o m e other appoint ()
a class requires an
attached to the class box by a line. If
class box by a line. release ()
semicircle attached to the
class is shown as a small

Fig. 1A.6 Active Class


Example
that hides its
A component is a modular part of the system design
(6) Component: implementation of a
<< interface >>| external interfaces. The
IWindow
IWindow implementation behind a set of
and connectors, the parts
Window component can be expressed by wiring together parts
a component is rendered
like a class
open ( can include smaller components. Graphically,

close() IPaint with a special icon in the upper right corner.

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

the focus Is on the


set of objectsh
DY d Computational process. In a n interaction,
life cycle of one object at 2n
interact. In state machines, the focus Is on the
<<artifact> without regard to
whereas in activity, the focus is on the flows among steps

object performs each step.


Nindow.dll rendered
Graphically, an action is
step of an activity
A is called an action.

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.

EAR Grouping Thingsin UML

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

messages, actions and connectors. an interaction is rendered as full line


Graphically, Fig 1413 Package
with a dark head. 113 Annotational Things in UM
These things are the explanatory
parts that ex1sts in UML. Annotational thin
provide
additional information about a model by
using the procedure of remarkg
comments. An example of annotational is a note. things
Pis 410 Interaction Note: A note is a symbol for rendering constraints and comments attached to
State machine represents various states through
which an object
Graphically, note is rendered as a
an
ele
(2) State Machine: a
rectangle with a dog earned corner.
machine involves a number
in its lfe time in response to events. The state
passes Example
of other elements, inciuding states,transitions, events and activities. Graphically, a
state machine is rendered as rounded rectangle.

Redo
Sending

141 State Machine Pig LA4 Note


O8JECT ORIENTED SYSTEM DEVELOPMENT
PROFESSIONAL PUBLICATIONS PROFESSIONAL PUBLICATI
O8JECT ORIENTED SYSTEM DEVELOPMENT
1.14
UML Introduction [Unit I, Ch. 1) Sylakry cy 1.15
UML Introduction
Relationships in the UML [Unit 1, Ch. 1]
Classifiers. In this
different
) between
The word Realization : Realization relationship
Notaiion" UML refers to set of
in
is a
other classilier ensures to
symbols whuch are used to represent relations d Classifier defines an agreement that thc
a system. These symbols also play a vital role in ,

O u t . This type of association is seen in the following situdtuo


defining a system. Based on these
notations, UML defines four types of
relationships. They are,
(1) Among use cases and collaborations.
Dependency :A dependency semantics relation between two model elements.
is a
In which a change to one element () Anong interfaces and classes.
may affect the semantics of the other element.
However, the reverse may or may not be true. The
dependency relationship is ne Fig. 1.4.18 shows the realization relationship.
represented as,
A

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

Static View Dynamic View - u h i e Vis


Diagrams Diagrams
Fig 14.16 Association
the Class Diagram U s e Case Diagram
the starting and the ending of
From the Fig. 1.4.16, 'A' and 'B' represents
associated to B". It often Object Diagram -Sequence Diagram
we can say that "A is
symbol. With reference to the symbol is a
contain other adornments.
Such as multiplicity and end n a m e s . Aggregation -Component Diagram Cornmunication Diagram
between a whole
representing a structural
relationship Composite Structure Diagram S t a t e Diagram
special kind of association,
and its parts.
Deployment Diagram Activity Diagram
Generalization is termed as a "Specialized Relationship".
In thisS
Package Diagram Timing Diagram
3)
Generalization
: substituted with the objects of another
Interaction Overview Diagramn
of one entity can be
reiationship, the objects and the
substituted is known as parent entity
whose objects are
entity. The entity is known as child entity.
Fig. 1419 Categorization of UML Diagram
objects for replacement
entity which is prOVIding
is represented as, (1) Static View Diagrams
true. G e n e r a l i z a t i o n
r e v e r s e is not the
However, the
Parent (i) Class Diagram: These diagrams reveals the static design view of a system and
Child
Entity includes few active classes which used
Fntity
are in addressing the static process view
of a system. The class diagram consists
PIg 1A17Generalization
of classes, interfaces and collaborations
and their relationships. The main
specialized element purpose of class diagrams is to visualize, specify
child entity is a
1.4.17, we can say that
Referrng to Fig. and document the structural modeling.
element.
1s a generalized
and parent entity
PROFESSIONAL PUBLICATIONS OBJECT ORIENTED SYSTEM DEVELOPMENT PROFESSiONAL PUBLICATIONS
DEVELOPMENT
ORIENTED SYSTEM
OBJECT
1.17
16 UML Introduction (Unit 1, Ch. 11 UML Introdurtion [Unit . 1, Ch- 1 transitior
of states,
and it consisting
(i) Objective Diogrom: An object diagram shows a set of objects and their a state
machine
h e importance
o e Diagram: It shows
view of an object.
relationships. These are aiso the kind ot ctass diagrams in reveal1ng address the dynamic
activities These are interface, ciass
VEnts and behavior
an of
static drsign view or static process View of a system The unigueness of the the
Or these dragrams Isin modeling
behavior of 3n object. These
diagrams s that, it llustrates data structures, the stetc snapshots of instances emphasite the event -oriented
Oaboration and
of elements existing in class diagrams reactive systems.
diagrams are used in modeling
while modeling functionals
(i) Component Diagram: This diagram shows an encapsulated class and ts
ctivity Diagram: These diagrams forms
effective
the type of flows
activity(ies),
nterfaces, ports and internal structure consisting of nested components and Hence these diagrams reflects
systen. these activitia
connectors These dragrams address the static design implementation view of ofa given
and finally the response of objects to
between these actvities it prioritize
is build1ng large systems from smaller to be modeled,
a system The importance of these diagrams of a given system
In this way, it reflects dynamic aspect
parts control among objects
participating in the system.
the tlow of

(iv) Composite Structure Diagram:


These diagrams are applicable to any cdass, from interaction diagram that shows actual times
kind of an

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.

A artifact diagram shows the physical constituents of a system


on the 42Rules of UML
computer. These inchude fiies, databases and similar physical collections of bits.
A language is said to be a 'well-formed' language, if it satisfies certain predefined
UML treats artifact diagrams as a variety of deployment diagram.
rules or specifications. UML s not an exception for such specification. According to
itself
shows the decomposition of the model "well-formed model" is equipped with all the essentialis and reflects uniformity with
(vi) Package Diagram: These diagrams a
into organization units and their dependencies. Its comodels.

(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

ordering of messages. (3) Visibility : Visibility


in this case refers to
the way these names are visioned
set of objects
utilized by other entities.
An interaction an interaction, consisting of a
diagram shOwS
These
the messages that may be dispatched among them. (4) Integrity : Integrity còrresponds to the process of
roles, including
or
collaborating all the entities into
diagrams addresSes a dynamic view of a system. single instance.
Diagram: It is an interaction diagram that emphasizes the (5) Execution: Here, execution refers
(ii) Communication roles that send and receive mnessages.
to the procesS of
triggering the final model.
Structural organization of the objects or
It has to be noted that
every end model may not be
Both sequence and diagrams represent Similar basis
communication each phase in sottware development
"well-formed because,
a different view of the concepts.
process may unveil new instances.
Concepts, but each diagram emphasizes VISualization ot a gven project may Also,
communication vary with respect to different
SequencC diagrams emphasize temporal
ordering where as with these reasons the models stakeholders. Hence,
which the flow of messages. developed may remain inconsistent,
diagrams enphasize the data structure through elided (i.e., hiding few incomplete
specifications).
PROFESSIONAL. PUBLICATIONS
DEVELOPMENT OBJECT ORIENTED SYSTEM
OBJECT ORIENTED SYSTEM DEVELOPMENT
PROFESSIONAL PUBLICATIO
1.18
UMLIntroduction (Unit 1, Ch.1 UML Introduction [Unit 1, Ch 1 1.19
Common Mechanisms in the UML
By consistently Student S .Student.3
apply1ng four common mechanisms throughout the Student 5 Student 2
make UML
Simpler, They are, language, we can

name Sam
43.1 Specifications rolno
Johnny
01E21A01
Johnson
OEIAI218
02E1AL21

phone 2413746 25167483 345126/


The
"specifications" in UML are used to provide
the textual information about
system which is under the
construction. Using UML, the model of the
This model system is developed.
initialy consists of only the UML diagrams. (a) (b) (c) (d)
Comes into
Now, the use of 'specification
picture.
The specfication
provides the information about the syntax and
semantics of all the
building blocks that participate in the system development. This
Fig 1A21 Classesand Objects
rig1.4.21 (a) a class is represented by class name "Student", with ame,
information includes the
attributes, operations and behaviors of the classes. Thus, Fig. 1.4.21 (b), (c). (d) are the objects of class
USing UML's graphical notation and phone
Sudent, Ihe attributes of
as its attributes.
specification, it is possible to incrementally build the objects describes the name, rollnumber and pione
up a model by drawing of the
diagrams and then, providing semantics the using respective students.
specification
1:432 Adornments 4Intertace and Implementation The second
: common division is intertace dnd
mplementation. Interface is a contract to carry out certain services and
Every element in UML posses its own mplementation is the authorization of
specification and representation. These these services. UML also provides several
representations are formatted and designed in such a way that, the element mechanisms to model interface and
should look implementation.
Simpler. Every element in UML has a unique style of
representation.
For example, consider the representation class as shown Fig. 1.4.20.
Tkey
Student Air Conditioner

+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

who view the system


drenolders are the people
(1) Stereotypes: Astereotypes extends the vocabulary or the UML, perspective
in the cxIsting model to provide a specitic intormation Stereotypes are used
On designing a keyboard, we nave

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.

to satisfy various stakeholders


the engineers, developers, design
stakeholders as
<<Stop >> nence, we can refer the
Named Stereotype
the login name is take part equally n designing a system.
Wrong which is followed
Try again Software architecture refers to a procedure,
otware Architecture views (where a view is
0eveloping a software. The procedure consists of five
of software development) namely,

Fig 142A Named-stereotype with a Message (1) Use case view.

(2) Development view.


<<Stop >>
Icon
thetogin name is (3) Implementation view
wrong
Try again! (4) Process view.
(5) Design 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 :

by enhancing (or) by modifying the existing rules.


Fig, 1.51 Views in Designing Software Architecture
PROFESSIONAL PUBLICATIONS
08JECT ORIENTED SYSTEM DEVELOPMENT
O8JECT ORIENTED SYSTEM
DEVELOPMENT
PROFESSIONAL PUBLICAT
(1) Use Case View UMLIntroduction [Unit -1, Ch. UML Introduction
1] (Unit 1, Ch. -1)
1.23
) The use cases
are the (5) Implementation View
major elements that describes the
() he end
users, behavior of the system. 0 It consists of
analysts and testers components and files that are used to assemble a physical system.
with the use case are the
view. specimen who are majoly concerned (7) UML refers static aspects of this view while
considering component diagrams
() This view mainly and dynamic
aspects by considering interaction diagrams,
state chart
deals with those
values that shape the diagrams and activity diagrams.
(v) UML refers static system's architecture.
aspects of this view while Each of these five views are
dynamic aspects by considering use case
diagrams and independent of each other so that the designers
considering interaction diagrams, state chart
of software architecture can readily accept the
challenge of the designing process.
activity diagrams. diagrams and
With UML we can
implement any on of these views and their interactions.
(V) Use view does not account
system.
case
for specifying the organization of a software SOFTWARE DEVELOPMENT LIFE CYCLE
The UML is not bounded to
any particular software development life cycle.
(2) Process View 1.e., it is
process independent. The three main
aspects of this process are,
I n this (1) Use Case Driven
view system's concurrency and synchronization
Use cases are used as a basic
artifact to establish the desired
as it
are of large importance behavior of the system, to
comprises of threads and process. verify and validate the system's architecture and to test
and communication
among the personnel involved in the project.
() Here systems performance, scalability and
throughput is of great importance. (2) Architecture Centric:
A system's architecture is used as a basic artifact to create a
() UML refers static
aspects of this view while considering the class diagrams and Concept, construct, manage and evolve the
system under development.
object diagrams and dynamic aspects by considering state chart (3) Iterative and Incremental Process: It
diagrams, manages a stream of executabie releases. An
interaction diagrams and activity diagrams. incremental process involves the continuous
to produce these
integration of the system's architecture
iv) Here static and dynamic aspects are achieved only by relying on the active classes release, with each new release containing incremental
that represents threads and processes. improvements over the other. Bother the iterative and incremental
risk-driven, i.e., each new release is focused on processes are
(3) Design View attacking and reducing the most
significant risks to the success of the project.
0) It consists of classes, interfaces and collaborations that form's the actual
Phases: The use case driven, architecture-centric and
definition of a problem and it's solution. divided into iterative/incremental process can be
phases.A phase is the
period of time between two major milestones of the
process, when a wel-defined set of
() This view accounts for functional requirements of the system. objectives are met, artifacts are completed and decisions
are made into the next
phase or not. There are four phases in the software
elaboration, construction and transition. In the Fig. 1.6.1 development
(n) Here functional requirements indicates services that the system provides to its life cycle, inception,
end users. plotted against these phase, showing their workflows are
vary1ng degrees of focus with to time.
respect
iv) UML refers static aspects of this view while considering the class diagrams and Proes: Work""aws nceptiontladorationConstruction ranSition
object diagram and dynamic aspects by considering state chart 2qrams Business Modeling
interaction diagrams and activity diagrams. Requirements
Analysis and Design
(4) Deployment View
fmptementatton

mainly used in system's hardware topology. Test


(i) Jt consists of nodes which are
Development
Here main stress is laid on the distribution, delivery and installation of parts that Conficuratron dnd Change Management
()
forms the physical systems. Project Managernent
Envronment
this view while considering deployment diagrams
UML refers static aspects of
Preliminary| Iter Iter ter
(ii) Iterations |#1 #2
interaction diagrams, state chart diagrams
and dynamic aspect by considering
Fig 161 Software Development Lile Cyde
and activity diagrams.

PROFESSIONAL PUBLICATIONS OBJECT ORIENTED SYSTEM DEVELOPMENT


OBJECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PUB!ICATO
the point of being
sutficientiy well-founded to enter into
the
(2) Elaboration Phase : In this elaboration pna>t.
phase the product vision and its imporl java awt Graphics.
and the system's architecture
requirements are
articulated, prioritized
and baselined. A
are defined
makes the class Graphics directly available to the code that tollows. The java awt
requirements may include general vision system's
statements to precise evaluation
specifying particular functional or non-functional criteria, specifies the Java package in which the class Graphics lives.
and providing a basis for
(3) Construction Phase : In this testing.
phase the software The second line of code,
is brought from an executable
architectural baseline to be transitioned
to the user
requirements and its evaluation criteria community. The system's class HelloWorld extends java.applet Applet
business needs of the
are
constantly re-examined against the
project and resources are allocated introduces a new class named HelloWorld and specifies that it is a kind of
risks to the
project. appropriately to attack class
like Applet, which lives in the package java applet
(4) Transition Phase: In this
phase the software goes into the hands of the user The next three linea of
community. The software code,
development process does not end here, the system is
continuously improved, bugs are removed and new features are pubhc void paint(Graphics g)
added
The element that
distinguishes this process and found in all four phases is called
as an iteration. An iteration is a
distinct set of activities, with a baselined
plan and
evaluation criteria which results in a release, which 9.drawString ("Hello, World!", 10,10):
may be internal or external. The
software development life cycle involves a continuous
stream of executable releases
of the system's architecture.

declare an operation named paint, whose


7 8 HELLO, WORLD named, drawString.
implementation invokes another op
responsible for printing the string "Hello,World" at the
The first program many developers write when
approaching a new programmin9 coordinates. In the usual gi
object-oriented fashion, drawString is an
language is a simple one, involving litte more than printing the string "Hello, World"
parameter named g, whose type is the class
operatio
Graphics
Modeling "Hello, World!" is about the simplest use of the UML you'l ever find. However,
Fig. 1.7.1 shows graphical
this application is deceptively easy because underneath it all there are some interesting representation of HelloWorld.
mechanisms that make it work. These mechanisms can easily be modeled with the UM,
providing a richer view of this simple application.
HelloWorid
In Java, the applet for printing "Hello, World!" in a web browser is quite simple.
g.drawString
import java.awt.Graphics. paint()- (Hello, World!", 10, 10)

class lelloWorid exlends java applet Applet

public void paint(Graphics g) Tg 171 Key Abstractions for HelloWorld


This class
diagram captures the basics of the
Qut a number of "Hello, World!" application, but it
g.drawString('lHeliow,World!",10,10): things. As the preceding code
Graphics are involved in this specifies, two other
is used as application and each is used in different classes, Apple
the way. The
parent of HelloWorld and the class class
implementation of one of its Graphics is used in the
signatur
PROFESSIONAL PUBLICATIONS
operations, paint.
OBJECT ORIENTED SYSTEM DEVELOPMENT O8JECT ORIENTED SYSTEM
DEVELOPMENT
PROFESSIONAL PUBLICAT
1.26
1.27
UMLIntroduction [Unit 1, Ch. 1) UMLIntroduction [Unit-1, Ch. 1]
we can
represent these classes and their
different relationships to the lass ViSualize this packaging class diagram, shown in Fig. 1.7.4. As this Fig.
HelloWorld in the class TO Can in a

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

Fig. 17.2 Immediate NeighboursSurrounding HelloWorld lang


This is not the end of the framework upon which HelloWorld is built. If you study
the Java libraries for Applet and Graphics, you will discover that both of these classes
are part of a larger hierarchy. Tracing just the classes that Appiet extends and implements, Fig 174 HelloWorld Packaging
you can generate another class diagram, shown in Fig. 1.7.3. The hardest part of mastering
library as rich as Java's learning how its parts work
a

together. For example, how does HelloWorld's paint


operation get invoked? What
Object operations must you use if you want to change the behavior of this applet, such as making
it print thestring in a different color? To answer these and other questions, you must
have a conceptual model of the way these classes work together
dynamically.
O
Image Observer
Component Studying the Java library reveals that HelloWorld's paint operation is inherited from
component. This still begs the question of how this
operation is- invoked. The answer
is that paint is called as part of
running the thread that encloses the applet, as Fig. 1.7.5
Container illustrates

root: Thread : Toolkit ComponentPeer target: HelloWorld


Panel
run
run
CallbackLoop
Applet
andleExpose paint

HelloWorld

HelloWorld Inheritance Hierarchy


Pig 17.3 Flg. 17,5 Painting Mechanismn
PROFESSIONAL PUBLICATIONS O8JECT ORIENTED SYSTEM
DEVELOPMENT
OBJECT ORIENTED SYSTEM DEVELOPMENT PROFESSIONAL PUBICA
1.29
1.28 I, Ch. 1
UMLIntroduction (Unit 1, Ch. 1 UMLIntroduction [Unit
ANSWERS
You QUESTIONS
WITH
can model this physical view using an artifact diagram, as shown in EXPECTED
UNIVERSITY
F19. 1.7.

Helloworld modeling.
model? What are principles of
Whot is
Q1)

<<manifest>> <<manifest>> Answer


1.2.1 and 1.2.3.
hello.java Section Nos.
Refer Page No. 1.4,
<<artifact>>
HelloWorid.class of object
orientation? Explain briefly.
the basic features
hello.html 02) What are

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.

Q4) Explain thee various relationships with UML notation.

Answer:

Refer Page No. 1.14, Section No. 1.4.1.2.

Uispaue io Ie fo mMl, Spev Liuay


Q5)
Answer
Which UML diagrams give a static view and which give a dynamic view of a syste

Refer Page No. 1.15, Section No. 1.4.1.3.

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.

Q7) Explain the UML approach to software architecture.

Answer

Refer Page No. 1.21, Section No.


1.5.1
OBJECT ORIENTED SYSTEM DEVELOPMENT
DEVELOPMENT
PROFESSIONAL PUBLICATIONS PROFESSIONAL PUBLICA
08JECT ORIENTED SYSTEM

You might also like