WKES2304: Object Oriented Modeling - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

WKES2304: Object Oriented Modeling

Description:

the number of OO methods increased to ... Names : what we call things, relationships and diagrams. Scope : the context that gives specific meanings to names ... – PowerPoint PPT presentation

Number of Views:104
Avg rating:3.0/5.0
Slides: 23
Provided by: azwinamo
Category:

less

Transcript and Presenter's Notes

Title: WKES2304: Object Oriented Modeling


1
WKES2304 Object Oriented Modeling
  • Chapter 2 Introduction to Unified Modeling
    Language (UML)

2
Chapter Outline
  • UML History
  • UML Overview
  • Where can UML be used?
  • 3 Recommended steps to understand UML
  • Example Modeling the Hello World program

3
UML History
  • Object-oriented modeling languages appeared
    sometime between the 70s and 80s, as an
    experiment with alternative approaches to
    analysis and design
  • the number of OO methods increased to more than
    50 by 1994
  • problem arose in finding a modeling language that
    can satisfy users needs
  • led to the so-called methodology war

4
  • 3 clearly prominent methods emerged from the
    so-called methodology war
  • Booch methods expressive during the design and
    construction phase of projects
  • Jacobsons Object Oriented Software Engineering
    (OOSE) - provides excellent support for use cases
    as a way to capture and analyse requirements and
    high-level designs
  • Rambaughs Object Modeling Technique - useful for
    analysis and data-intensive information system
  • The combination of these 3 methods led to the
    creation of the Unified Modeling Language, UML
  • the UML definition strives to make the best
    trade-offs in each of these areas

5
UML Overview
  • UML is a standard language for writing software
    blueprints
  • it is only a language
  • it is NOT a process, just part of a software
    development method
  • it is process independent

6
  • UML is a language for
  • visualizing
  • specifying
  • constructing
  • documenting
  • the artifacts of a software-intensive system.

7
The UML is a language
  • A language provides vocabulary and the rules for
    combining words in that vocabulary for the
    purpose of communication
  • A modeling language is a language whose
    vocabulary and rules focus on the conceptual and
    physical representation of a system
  • thus, UML is a standard language for s/w
    blueprints
  • helps in the understanding of a system
  • may need more than one model
  • UML tells you how to create and read well-formed
    models
  • but does not tell you what models you should
    create and when you should create them
  • that is the role of the s/w development process

8
UML is a language for Visualizing
  • Typical practice Thinking (idea) and then
    transform it into code
  • still doing some modeling, informally and
    mentally
  • sometimes scribble ideas on notepad or whiteboard
  • problems with this approach
  • errors in communicating these models, unless
    everyone involved speaks the same language
  • using textual programming language to model a
    system does not make it easier to understand the
    system
  • If the models used for building the programming
    code were never documented, it will be lost
    forever, or difficult for the programmer to
    recreate it

9
  • By writing models in the UML, these problems can
    be overcome -
  • An explicit and formal model like the UML
    facilitates communication
  • By writing down the model in a formal language,
    people who knows the modeling language can
    understand and read the models built
  • Behind each symbol in the UML notation is a
    well-defined semantics/meaning
  • Very useful especially for large project with
    many abstract ideas and processes
  • Since UML is a graphical language, it transcends
    what can be represented in a programming language

10
UML is a language for Specifying
  • Here, specifying means building models that are
    precise, unambiguous and complete
  • The UML addresses the specification of all the
    important analysis, design and implementation
    decisions that must be made in developing and
    deploying a software-intensive system

11
UML is a language for Constructing
  • The UML models can be directly connected to a
    variety of programming language
  • It is possible to map from a model in the UML to
    a programming language such as Java, C etc
  • This mapping permits forward engineering
  • The generation of code from a UML model into a
    programming language

12
UML is a language for Documenting
  • The UML addresses the documentation of a systems
    architecture and its details
  • The UML also provides a language for expressing
    requirements and for tests
  • The UML also provides a language for modeling the
    activities of project planning and release
    management
  • The combination of UML models and other kinds of
    work products that come out of a development
    effort generally forms a solid set of project
    documentation.

13
Where can UML be used?
  • It is primarily for software-intensive systems
  • Enterprise information system
  • Banking and financial system
  • Telecommunication
  • Transportation
  • Defense/aerospace
  • Retail
  • Medical electronics
  • Scientific
  • Distributed web-based services

14
3 Recommended steps to understand UML
  • Requires learning 3 major elements-
  • The UMLs basic building block
  • The rules that dictate how those building blocks
    may be put together
  • Some common mechanisms that apply throughout the
    UML

15
1) The basic building blocks of the UML
Diagrams
Class diagram Object diagram Use case
diagram Sequence diagram Communication
diagram State machine diagram Activity
diagram Component diagram Deployment diagram
etc. Timing diagram
16
2) Rules of the UML
  • The UML has rules that specify how the building
    blocks can be put together in order to build a
    well-formed model
  • A well-formed model is one that is semantically
    self-consistent and in harmony with all its
    related models
  • The UML has semantic rules for -
  • Names what we call things, relationships and
    diagrams
  • Scope the context that gives specific meanings
    to names
  • Visibility how those names can be seen and used
    by others
  • Integrity how things properly and consistently
    relate to others
  • Execution What it means to run or simulate a
    dynamic model

17
3) Common mechanisms
  • To make UML simpler
  • Four types -
  • Specifications
  • Adornments
  • Common divisions
  • Extensibility mechanisms

18
Example Modeling the Hello World program
  • class HelloWorld
  • public
  • void greet()
  • cout
  • class HelloMalaysia public HelloWorld
  • public
  • void greeting()
  • greet()
  • cout

19
Both classes can be represented graphically in
UML using the class building block, or class
diagram
Key abstraction for HelloWorld
greet() coutKey abstraction for HelloMalaysia
20
The diagrams before are not complete as it does
not show the relationship between those classes
(if any). The relationship between those two
classes can be presented in another class
diagram, as shown below -
represents the generalization relationship
HelloMalaysia is a child (subclass) of HelloWorld
(superclass)
21
UML 2.0 DIAGRAMS
22
Tools
  • The software tools that you can use to draw UML
    diagrams are -
  • Rational Rose
  • Visio
  • Systems Architect
  • VP-UML
  • ArgoUML
  • etc.
Write a Comment
User Comments (0)
About PowerShow.com