Object Oriented
Programming -
Introduction to UML
Dr. Warsun
Najib
TIF211131 - Pemrograman Dasar
DTETI Fakultas Teknik
Universitas Gadjah Mada
LOCALLY ROOTED,
GLOBALLY RESPECTED [Link]
U~
Unified:
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
M~
whole development lifecycle.
Modeling:
• Making a semantically* complete abstraction of a system. (* The
formal specification of the meaning and behavior of something)
• Easier to communicate between stakeholders
L~ Language:
• A graphical language
Itntroduction to UML, page 2
UML History
• 1970 : development method using traditional programming language
such as Cobol, Fortran. This method became widespread in the 1980s.
• The first OO language, Simula, is developed in 1967.
• Since 1980 OO language: Smalltalk, C, C++, Eiffel
• Unification effort since 1990.
• 1994 Rumbaugh (OMT) and Booch (Rational software) began to
develop UML which first-proposed in 1995.
• 1996: Object Management Group (OMG) issued RFP for standard
approach to OO-modeling
• September 1997: Final UML proposal submitted to OMG.
• Nov 1997: UML is adopted as a standard by OMG
• 2000: Specification of UML 1.4
• 2002: Specification of UML 2.0
• 2011: Specification of UML 2.4.1
• 2015: Specification of UML 2.5
• 2017: Specification of UML 2.5.1
Itntroduction to UML, page 3
Where Can the UML be Used?
• Enterprise information system
• Banking and financial service
• Telecommunication
• Transportation
• Defense/Aerospace
• Medical electronic
• Scientific
• Retail
• Distributed Web-based Services
• etc (Look at UML success story at [Link])
Itntroduction to UML, page 4
UML Is Based on Object-
oriented Concepts
• A program will typically consist of objects that
cooperate to solve a task.
• An object will typically have attributes (data) and
methods (behavior), this defines the state of the object
and the manner in which the object operate.
• Objects communicate by sending messages to each
other. Sending a message to an object is the same as
calling a method of the object.
Itntroduction to UML, page 5
Class and Object as Defined by
Booch, Rumbaugh and Jacobson
• Class: A description of a set of objects that
share the same attributes, operations,
relationships, and semantics.
• Object: A concrete manifestation of an
abstraction; an entity with a well defined
boundary and identity that encapsulates
state and behavior; an instance of a class.
Itntroduction to UML, page 6
Some of the UML Goals
• Define an easy-to-learn but semantically rich visual modeling
language.
• Unify ideas from other modeling languages and incorporate
industry best practices.
• Support higher-level development concepts such as
collaborations (design patterns), frameworks and components.
• Provide flexibility for applying different processes and mapping
to different programming languages.
• Support extensibility and specialization mechanisms so that the
core concepts can be extended.
• Provide a formal basis so that model interchange between
different OO tools will be possible.
Itntroduction to UML, page 7
The Value of UML
• Open standard.
• Supported by many tools.
• Supports the entire development lifecycle.
• Support diverse application areas.
• Based on experience and needs of the user
community.
Itntroduction to UML, page 8
UML is Not a Visual
Programming Language
• UML is not a visual programming language. It does not have all
necessary visual and semantic support to replace programming
languages.
• But UML has a tight mapping to a family of OO languages like
C++, Visual Basic and Java.
• Mapping to Database System like Oracle, DDL etc
Mapping Program Code
UML Model Java, C++, VB etc
Itntroduction to UML, page 9
UML is Not a Development
Process
A development process defines:
- Who is doing What,
- When to do it, and
- How to reach a certain goal
• The UML is intentionally process independent, and defining a standard process
was not a goal of UML. Different domain may require different processes.
• But the UML authors promote a development process that is use-case-driven,
architecture centric, iterative and incremental.
(Example of method: RUP)
Itntroduction to UML, page 10
Abstraction
• Abstraction is a fundamental human capability, it
let us filter out nonessential details about a
complex problem or structure.
• Through abstraction, a system can be viewed at
different [Link] there is a hierarchic structure,
each level of model is more precise than its parent.
When developing a software system, code will be the
lowest and most detailed level.
Itntroduction to UML, page 11
Modeling
• What is a model? A model is a simplification of reality.
• When you make a model you are making a mapping from the
problem domain to a representation of the system you are modeling.
Reality
System
System
• When you work object-oriented the model tends to be close to the
system modeled, and a program execution can be regarded as
a simulation of the behavior of the system.
Itntroduction to UML, page 12
Why Do We Model?
• Models give us a template that guides us in
constructing a system.
• If you want to make a building you first make a
blueprint of the building to make, in the same way
you should make a model of the system you want to
make. As the complexity of systems increases, so does
the importance of good modeling techniques.
• Models help us visualize a system at different levels
of abstraction, this makes it easier to manage
complexity and to understand the system.
• Models document the dicisions we have made
Itntroduction to UML, page 13
More Arguments -
Why Do We Model?
• It is not expensive to experiment with
multiple solutions when you operate on a high
level of abstraction.
• Models help for communication between
different stakeholders.
Manager Programmer
Accountant
Itntroduction to UML, page 14
UML – a Graphic Language for
The UML is a standard language for writing software
blueprints. It may be used as
• Visualizing
– Using the standardized graphic UML displays
• Specifying
– Semantics to define
• static structure
• dynamic behavior
• model organization
• Constructing
– Map UML to Programming Environment and Generate some
code Automatically
• Documenting
– Every phase of lifecycle from analysis and design through
deployment and maintenance
Itntroduction to UML, page 15
Building Blocks of the UML
• Modeling Element • Diagram
1. Structural things 1. Class diagram
2. Behavioral things 2. Object diagram
3. Grouping things 3. Use case diagram
4. Annotational things 4. Sequence diagram
• Relationships 5. Collaboration diagram
1. Dependency 6. Statechart diagram
2. Association 7. Activity diagram
3. Generalization 8. Component diagram
4. Realization 9. Deployment diagram
Itntroduction to UML, page 16
UML TOOLS
We use UML Tools to :
1. Create dan design model
2. Map to programming language (generate
program-code)
3. Reverse engineering from program code into
UML model.
4. Export / Import model between various UML
tools using XMI standard.
5. Generate software system documentations
Itntroduction to UML, page 17
UML TOOLS
• Enterprise Architect • iUML (intelligent UML)
• Rational Rose • Kabira
• StarUML • UMLet
• Poseidon UML • PlantUML
• Together Control Centre • [Link] (online, drawing
• Argo UML (open source) only)
• Visio (drawing only)
Itntroduction to UML, page 18
Who are behind UML?
Some of the OMG members:
AT&T Glaxo Microsoft Rational
BEA HP MITRE SAGA
Borland Hitachi MSC Soft SAP
Boeing Hyperion NASA SAS
IBM NEC
CA Secant
IONA NetGenics
Citigroup Siemens
io Nokia
Compaq Sprint
Software NTT
Ericsson Sun
Kabira OASIS
Ford Oracle
Unisys
KC
Fujitsu Pfizer Vertel
John Deere
Itntroduction to UML, page 19
References
• Grady Booch, James Rumbaugh and Ivar Jacobson:
The Unified Modeling Language User Guide.
Addison-Wesley, 1999
• Grady Booch, James Rumbaugh and Ivar Jacobson:
The Unified Modeling Language Reference Manual.
Addison-Wesley, 1999
• UML Website: [Link] maintained by Object
Management Group (OMG)
• Rational software:
[Link]
• [Link]
Itntroduction to UML, page 20