0% found this document useful (0 votes)
3 views

UML Diagram Introduction and Class Diagram Notations

Chapter 5 of 'Object-Oriented Systems Development' focuses on the Unified Modeling Language (UML) and its various diagrams used for modeling systems. It explains the importance of modeling in simplifying complex ideas, enhancing learning, and reducing costs, while detailing static and dynamic models. The chapter also covers UML components such as class diagrams, use case diagrams, and various association notations.

Uploaded by

Jack Sparrow
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

UML Diagram Introduction and Class Diagram Notations

Chapter 5 of 'Object-Oriented Systems Development' focuses on the Unified Modeling Language (UML) and its various diagrams used for modeling systems. It explains the importance of modeling in simplifying complex ideas, enhancing learning, and reducing costs, while detailing static and dynamic models. The chapter also covers UML components such as class diagrams, use case diagrams, and various association notations.

Uploaded by

Jack Sparrow
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Object-Oriented Systems

Development:
Development
Using the Unified Modeling
Language

Chapter 5:
Unified Modeling Language

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Goals

• Modeling.
• Unified modeling language.
– Class diagram.
– Use case diagram.
– Interaction diagrams.
•Sequence diagram.
•Collaboration diagram.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Goals (Con’t)

– Statechart diagram.
– Activity diagram.
– Implementation diagrams.
•Component diagram.
•Deployment diagram.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Introduction
• A model is an abstract representation
of a system, constructed to
understand the system prior to
building or modifying it.
• Most of the modeling techniques
involve graphical languages.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Static or Dynamic Models

• Models can represent


– static or
– dynamic situations.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Static Model
• A static model can be viewed as a
"snapshot" of a system's
parameters at rest or at a specific
point in time.
• The classes’ structure
and their relationships
to each other frozen
in time are examples of
static models.
Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill
Dynamic Model
• Is a collection of procedures or
behaviors that, taken together,
reflect the behavior of a system
over time.
• For example, an order interacts
with inventory to determine
product availability.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Why Modeling?
• Turban cites the following
advantages:
• Models make it easier to express
complex ideas.
• For example, an architect
builds a model to
communicate ideas
more easily to clients.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Advantages of Modeling (Con’t)

• Models reduce complexity by


separating those aspects that are
unimportant from those that are
important.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Advantages of Modeling (Con’t)
• Models enhance learning.
• The cost of the modeling analysis
is much lower than the cost of
similar experimentation
conducted with a real system.
• Manipulation of the model
(changing variables) is much
easier than manipulating a real
system.
Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill
Modeling Key Ideas
• A model is rarely correct on the
first try.
• Always seek the advice and
criticism of others.
• Avoid excess model revisions, as
they can distort the essence of
your model. Let simplicity and
elegance guide you through
the process.
Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill
The Unified Modeling Language
(UML)
• The unified modeling language
(UML) is a language for specifying,
constructing, visualizing, and
documenting the software system
and its components.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


UML Diagrams
The UML defines nine graphical
diagrams:
1. Class diagram (static)
2. Use-case diagram
3. Behavior diagrams (dynamic):
– 3.1. Interaction diagram:
•3.1.1. Sequence diagram
•3.1.2. Collaboration diagram

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


UML Diagrams

– 3.2. Statechart diagram


– 3.3. Activity diagram
4. Implementation diagram:
4.1. Component diagram
4.2. Deployment diagram

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


UML Class Diagram,
• The UML class diagram is the
main static analysis diagram.
• Class diagrams show the static
structure of the model.
• Class diagram is collection of
static modeling elements, such as
classes and their relationships.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Class Notation
• In class notation, either or both the
attributes and operation compartments
may be suppressed.
Boeing 737 Boeing 737
length: meter
fuelCapacity: Gal
Boeing 737 doors: int

length: meter
fuelCapacity: Gal lift ()
doors: int break ()

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Class Interface Notation
• Class interface notation is used to
describe the externally visible
behavior of a class.
• For example, an operation with a
public visibility.

Person BankAccount

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Binary Association Notation
• A binary association is drawn as a
solid path connecting two classes or
both ends may be connected to the
same class.
worksFor
Company Person
employer employee

Person

marriedTo

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Association Role
• A simple association—the
technical term for it is binary
association—is drawn as a solid
line connecting two class symbols.
• The end of an association, where
it connects to a class, shows the
association role.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


UML Association Notation
• In the UML, association is represented
by an open arrow.

BankAccount Person

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Qualifier
• A qualifier is an association attribute.
For example, a person object may be
associated to a Bank object.
• An attribute of this association is the
account#.
• The account# is the Bank
qualifier of this account#
*
association.
0..1
Person
.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Multiplicity
• Multiplicity specifies the range of
allowable associated classes.
• It is given for roles within
associations, parts within
compositions, repetitions, and other
purposes.
• lower bound .. upper bound.

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


OR Association
• An OR association indicates a
situation in which only one of several
potential associations may be
substantiated at one time for any
single object.
Person
Car {or}

Company

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Association Class
• An association class is an association
that also has class properties.
• An association class is shown as a class
symbol attached by a dashed line to an
association path.
Company Person
employer employee

WorksFor
salary

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


N-Ary Association
• An n-ary association is an association
among more than two classes.
• Since n-ary association is more
difficult to understand, it is better to
convert an n-ary association to binary
association. semester *
Year

* *
Class Student
class student

GradeBook
grade
exam
lab

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Aggregation

• Aggregation is a form of association.


• A hollow diamond is attached to the end
of the path to indicate aggregation.

1 consistOf *
Team Player
class

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Composition
• Composition, also known as the a-
part-of, is a form of aggregation with
strong ownership to represent the
component of a complex object.
• The UML notation for composition is a
solid diamond at the end of a path.
Car
1 1 1 1

4,10 1 graphical composition


4 2,5
Wheel Light Door Engine
Car Car
4 4 Wheel
Wheel
4,10 nested composition
Light 4,10 Light
2,5 2,5
Door Door
1 1
Engine Engine

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill


Generalization
• Generalization is the relationship
between a more general class and a
more specific class.
• Generalization is displayed as directed
line with a closed, hollow Separate target style

arrowhead at the Vehicle

superclass end. Bus Truck Car

Shared target style

BoeingAirplane

Boeing 737 Boeing 757 Boeing 767

Object-Oriented Systems Development Bahrami ? Irwin/ McGraw-Hill

You might also like