Vous êtes sur la page 1sur 6

Object Oriented Software Engineering Notes

K S V Krishna Srikanth, Dept of IT, ANITS Page 11



2. MODELING WITH UML
INTRODUCTION TO UML (UNIFIED MODELING LANGUAGE)
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. UML was created by Object Management Group (OMG) and
UML 1.0 specification draft was proposed to the OMG in J anuary 1997.

What is UML?
UML is an acronym for Unified Modeling Language.
Unified:
Unification of earlier object-oriented analysis and design methods.
Same concepts and notation for different application domains and different
development processes.
Same concepts and notation through the whole development lifecycle.
Combines the best from existing object-oriented software modeling methodologies.
Grady Booch, J ames Rumbaugh, and Ivor J acobson are the primary contributors to
UML
Modeling
Used to present a simplified view of reality in order to facilitate the design and
implementation of object-oriented software systems.
Making a semantically* COMPELETE abstraction of a system. (* The formal
specification of the meaning and behavior of something)
Language
UML is primarily a graphical language that follows a precise syntax.

Where did UML come from?
OO modeling languages made their appearance in the late 70s.
As the usefulness of OO programming became undeniable, more OO modeling
languages began to appear.
By the start of the 90s there was a flood of modeling languages, each with its own
strengths and weaknesses.
In 1994 the UML effort officially began as a collaborative effort between Booch and
Rumbaugh. J acobson was soon after included in the effort.
The goal of UML is to be a comprehensive modeling language (all things to all
people) that will facilitate communication between all members of the development
effort.

Overview of UML
UML is a language.
o Conforms to specific rules.
o Allows the creation of various models.
o Does not tell the designer which models need to be created.
UML is a language for visualizing.
o UML is a graphical language.
Object Oriented Software Engineering Notes

K S V Krishna Srikanth, Dept of IT, ANITS Page 12

o Pictures facilitate communication (a picture is worth a thousand words).
UML is a language for constructing and understanding.
o UML supports both forward and reverse engineering.
UML is a language for documenting design
o Provides a record of what has been built.
o Useful for bringing new programmers up to speed.
o Useful when developing new releases of product.
UML is intended primarily for software-intensive systems

UML is a language,
For visualizing:
Facilitates communication between/among developers/clients.
Its a graphical language.
For specifying:
Building models those are precise, unambiguous and complete.
UML addresses the specification of all the important analysis, design and
implementation decisions.
For constructing:
Models can be directly connected to variety of programming languages.
Mapping permits forward engineering, the generation of code from UML model
into programming language.
Possibility of reverse engineering.
UML model is sufficiently expressive and unambiguous to permit the direct
execution of models, simulation of system and instrumentation of running
systems,
For Documenting:
Addresses the documentation of system architecture and all of its details.
Artifacts include requirements, architecture, design, source code, test and etc.

Where can UML be used?
Intended primarily for software-intensive system such as:
Enterprise information systems
Banking and financial systems
Telecommunications
Transportation
Defense/aerospace
Retail
Medical electronics
Scientific
Distributed web-based services, etc.

OMG is continuously putting effort to make a truly industry standard.
UML stands for Unified Modeling Language.
UML is different from the other common programming languages like C++, Java, and
COBOL etc.
Object Oriented Software Engineering Notes

K S V Krishna Srikanth, Dept of IT, ANITS Page 13

UML is a pictorial language used to make software blue prints.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object oriented analysis and
design. After some standardization UML become an OMG (Object Management Group)
standard.

A conceptual model of UML:
To understand conceptual model of UML first we need to clarify What is a conceptual model?
and Why a conceptual model is at all required?
A conceptual model can be defined as a model which is made of concepts and their
relationships.
A conceptual model is the first step before drawing a UML diagram. It helps to
understand the entities in the real world and how they interact with each other.
As 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:
UML building blocks
Rules to connect the building blocks
Common mechanisms of UML

OO Analysis and Design
Object oriented analysis can be defined as investigation and to be more specific it is the
investigation of objects. Design means collaboration of identified objects. So it is important
to understand the OO analysis and design concepts. Now the most important purpose of OO
analysis is to identify objects of a system to be designed. This analysis is also done for an
existing system. Now an efficient analysis is only possible when we are able to start thinking
in a way where objects can be identified. After identifying the objects their relationships are
identified and finally the design is produced.
So the purpose of OO analysis and design can describe as:
Identifying the objects of a system.
Identify their relationships.
Make a design which can be converted to executables using OO languages.
There are three basic steps where the OO concepts are applied and implemented. The steps
can be defined as

Object - Oriented View:
The object oriented approach to software development is decidedly simple. Because, it has
most contemporary languages, operating systems and tools are object-oriented in same
fashion. Object-oriented development provides the conceptual foundation for assembling
systems out of components using technology such as java beans. Visualizing, specifying,
constructing and documenting object-oriented systems are exactly the purposes of the
UML.
OO Analysis OO Design
OO Implementation
with OO languages
Object Oriented Software Engineering Notes

K S V Krishna Srikanth, Dept of IT, ANITS Page 14

During object oriented analysis the most important purpose is to identify objects and
describing them in a proper way. If these objects are identified efficiently then the next job
of design is easy. The objects should be identified with responsibilities. Responsibilities are
the functions performed by the object. Each and every object has some type of
responsibilities to be performed. When these responsibilities are collaborated the purpose
of the system is fulfilled.

The second phase is object oriented design. During this phase emphasis is given upon the
requirements and their fulfillment. In this stage the objects are collaborated according to
their intended association. After the association is complete the design is also complete.

The third phase is object oriented implementation. In this phase the design is implemented
using object oriented languages like Java, C++etc.

UML is a standard language for modeling software systems
Serves as a bridge between the requirements specification and the implementation.
Provides a means to specify and document the design of a software system.
is process and programming language independent.
is particularly suited to object-oriented program development.

NOTATIONS
Classes: A class is a description of a set of objects that share the same attributes, operations,
relationships and semantics.

Collaboration & Use Case
Collaboration defines an interaction, i.e., a society of roles and other elements that work
together to provide some cooperative behavior.

A use case is a description of a set of sequence of actions that a system performs that yields
an observable result.

Component & Node
A component is a physical and replaceable part of a system that conforms to and provides
the realization of a set of interfaces.
Object Oriented Software Engineering Notes

K S V Krishna Srikanth, Dept of IT, ANITS Page 15


A node is a physical element that exists at run time and represents a computational
resource.

Behavioral Things: Messages & States
An interaction is a behavior that comprises a set of messages exchanged among a set of
objects within a particular context to accomplish a specific purpose.


A state machine is a behavior that specifies the sequence of states an object or an
interaction goes through during its lifetime in response to events.

Annotation
A note is a symbol for rendering constraints and comments attached to an element or a
collection of elements.

Relationships
A dependency is a semantic relationship between two things in which a change to one may
affect the semantics of the other.


An association is a structural relationship that describes a set of links, a link being a
connection among objects.


A generalization is a specialization/generalization relationship is which objects of the
specialized element (child) are substitutable for objects of the generalized element (parent).

Object Oriented Software Engineering Notes

K S V Krishna Srikanth, Dept of IT, ANITS Page 16

A realization is a semantic relationship between classifiers, wherein one classifier specifies a
contract that another classifier guarantees to carry out.

Diagrams in UML
A diagram is the graphical representation of a set of elements, usually rendered as a
connected graph of vertices (things) and arcs (relationships).
Class diagram shows a set of classes, interfaces, and collaborations with their
relationships.
Object diagram shows a set of objects and their relationships.
Use case diagram shows a set of use cases and actors (a special kind of class) and
their relationships.
Interaction diagram shows an interaction, consisting of a set of objects and the
relationships, including the messages that may be dispatched among them.
A sequence diagram emphasizes the time ordering.
A collaboration diagram emphasizes the structural organization of the
objects that send and receive messages.
State chart diagram shows a state machine consisting of states, transitions, events,
and activities.
Activity diagram is a state chart diagram that shows the flow from activity to activity
within a system.
Component diagram shows the organization and dependencies among a set of
components.
Deployment diagram shows the configuration of processing nodes and the
components that live on them.

Vous aimerez peut-être aussi